Interface ExpirableLockRegistry

All Superinterfaces:
LockRegistry
All Known Implementing Classes:
JdbcLockRegistry, RedisLockRegistry, ZookeeperLockRegistry

public interface ExpirableLockRegistry
extends LockRegistry
A LockRegistry implementing this interface supports the removal of aged locks that are not currently locked.
Since:
4.2
Author:
Gary Russell
  • Method Summary

    Modifier and Type Method Description
    void expireUnusedOlderThan​(long age)
    Remove locks last acquired more than 'age' ago that are not currently locked.

    Methods inherited from interface org.springframework.integration.support.locks.LockRegistry

    obtain
  • Method Details

    • expireUnusedOlderThan

      void expireUnusedOlderThan​(long age)
      Remove locks last acquired more than 'age' ago that are not currently locked.
      Parameters:
      age - the time since the lock was last obtained.
      Throws:
      IllegalStateException - if the registry configuration does not support this feature.