Interface NamedLockFactorySelector

All Known Implementing Classes:
DefaultNamedLockFactorySelector

public interface NamedLockFactorySelector
Selector for system-wide use of named locks.
Since:
2.0.17
  • Method Details

    • getAvailableLockFactories

      Returns immutable set of available lock factory names, to be used for logging purposes or alike. Never returns null.
    • getNamedLockFactory

      Selects NamedLockFactory based on configuration. Never returns null but may throw in case of invalid configuration.
      Parameters:
      configuration - The configuration maps, must be not null.
      Throws:
      IllegalArgumentException - In case of invalid configuration.
    • getLockWaitTime

      long getLockWaitTime(Map<String,?> configuration)
      Returns the maximum amount of time to be blocked, while obtaining a named lock, based on configuration. May throw in case of invalid configuration.
      Parameters:
      configuration - The configuration maps, must be not null.
      Throws:
      IllegalArgumentException - In case of invalid configuration.
    • getLockWaitTimeUnit

      Returns the unit of maximum amount of time based on configuration. Never returns null but may throw in case of invalid configuration.
      Parameters:
      configuration - The configuration maps, must be not null.
      Throws:
      IllegalArgumentException - In case of invalid configuration.