<?xml version="1.0" ?>

<container xmlns="http://symfony.com/schema/dic/services"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd">

    <services>
        <defaults public="false" />

        <service id="lock.store.flock" class="Symfony\Component\Lock\Store\FlockStore" />

        <service id="lock.store.semaphore" class="Symfony\Component\Lock\Store\SemaphoreStore" />

        <service id="lock.store.memcached.abstract" class="Symfony\Component\Lock\Store\MemcachedStore" abstract="true">
            <argument /> <!-- Memcached connection service -->
        </service>

        <service id="lock.store.redis.abstract" class="Symfony\Component\Lock\Store\RedisStore" abstract="true">
            <argument /> <!-- Redis connection service -->
        </service>

        <service id="lock.store.combined.abstract" class="Symfony\Component\Lock\Store\CombinedStore" abstract="true">
            <argument /> <!-- List of stores -->
            <argument type="service" id="lock.strategy.majority" /> <!-- Strategy -->
        </service>

        <service id="lock.strategy.majority" class="Symfony\Component\Lock\Strategy\ConsensusStrategy" />

        <service id="lock.factory.abstract" class="Symfony\Component\Lock\Factory" abstract="true">
            <tag name="monolog.logger" channel="lock" />
            <argument /> <!-- Store -->
            <call method="setLogger">
                <argument type="service" id="logger" on-invalid="ignore" />
            </call>
        </service>

    </services>
</container>
