Class DynamoDbLockRegistry

java.lang.Object
org.springframework.integration.aws.lock.DynamoDbLockRegistry
All Implemented Interfaces:
org.springframework.integration.support.locks.ExpirableLockRegistry, org.springframework.integration.support.locks.LockRegistry, org.springframework.integration.support.locks.RenewableLockRegistry

public class DynamoDbLockRegistry extends Object implements org.springframework.integration.support.locks.ExpirableLockRegistry, org.springframework.integration.support.locks.RenewableLockRegistry
An ExpirableLockRegistry and RenewableLockRegistry implementation for the AWS DynamoDB. The algorithm is based on the DynamoDbLockRepository.
Since:
2.0
Author:
Artem Bilan, Karl Lessard, Asiel Caballero
  • Constructor Details

  • Method Details

    • setIdleBetweenTries

      public void setIdleBetweenTries(Duration idleBetweenTries)
      Specify a Duration to sleep between lock record insert/update attempts. Defaults to 100 milliseconds.
      Parameters:
      idleBetweenTries - the Duration to sleep between insert/update attempts.
      Since:
      3.0
    • obtain

      public Lock obtain(Object lockKey)
      Specified by:
      obtain in interface org.springframework.integration.support.locks.LockRegistry
    • expireUnusedOlderThan

      public void expireUnusedOlderThan(long age)
      Specified by:
      expireUnusedOlderThan in interface org.springframework.integration.support.locks.ExpirableLockRegistry
    • renewLock

      public void renewLock(Object lockKey)
      Specified by:
      renewLock in interface org.springframework.integration.support.locks.RenewableLockRegistry
    • toString

      public String toString()
      Overrides:
      toString in class Object