Class RedisTryLockRepository

java.lang.Object
se.swedenconnect.bankid.idp.concurrency.RedisTryLockRepository
All Implemented Interfaces:
TryLockRepository

public class RedisTryLockRepository extends Object implements TryLockRepository
A Redis implementation of TryLockRepository. Provides locks, distributed over Redis.
Author:
Martin Lindström, Felix Hellman
  • Constructor Details

    • RedisTryLockRepository

      public RedisTryLockRepository(RedissonClient client)
      Constructor.
      Parameters:
      client - the Redis client
  • Method Details

    • get

      public TryLock get(String key)
      Locking repository responsible for providing locks by key.
      Specified by:
      get in interface TryLockRepository
      Parameters:
      key - unique identifier for the lock
      Returns:
      a lock