Interface NamedLockFactorySelector

All Known Implementing Classes:
DefaultNamedLockFactorySelector

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

    Modifier and Type
    Method
    Description
    Returns immutable set of available lock factory names, to be used for logging purposes or alike.
    long
    getLockWaitTime(Map<String,?> configuration)
    Returns the maximum amount of time to be blocked, while obtaining a named lock, based on configuration.
    getLockWaitTimeUnit(Map<String,?> configuration)
    Returns the unit of maximum amount of time based on configuration.
    org.eclipse.aether.named.NamedLockFactory
    getNamedLockFactory(Map<String,?> configuration)
    Selects NamedLockFactory based on configuration.
  • Method Details

    • getAvailableLockFactories

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

      org.eclipse.aether.named.NamedLockFactory getNamedLockFactory(Map<String,?> configuration)
      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.