Package org.eclipse.aether.impl
Interface NamedLockFactorySelector
-
- All Known Implementing Classes:
DefaultNamedLockFactorySelector
public interface NamedLockFactorySelector
Selector for system-wide use of named locks.- Since:
- 2.0.17
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.Set<java.lang.String>getAvailableLockFactories()Returns immutable set of available lock factory names, to be used for logging purposes or alike.longgetLockWaitTime(java.util.Map<java.lang.String,?> configuration)Returns the maximum amount of time to be blocked, while obtaining a named lock, based on configuration.java.util.concurrent.TimeUnitgetLockWaitTimeUnit(java.util.Map<java.lang.String,?> configuration)Returns the unit of maximum amount of time based on configuration.org.eclipse.aether.named.NamedLockFactorygetNamedLockFactory(java.util.Map<java.lang.String,?> configuration)SelectsNamedLockFactorybased on configuration.
-
-
-
Method Detail
-
getAvailableLockFactories
java.util.Set<java.lang.String> getAvailableLockFactories()
Returns immutable set of available lock factory names, to be used for logging purposes or alike. Never returnsnull.
-
getNamedLockFactory
org.eclipse.aether.named.NamedLockFactory getNamedLockFactory(java.util.Map<java.lang.String,?> configuration)
SelectsNamedLockFactorybased on configuration. Never returnsnullbut may throw in case of invalid configuration.- Parameters:
configuration- The configuration maps, must be notnull.- Throws:
java.lang.IllegalArgumentException- In case of invalid configuration.
-
getLockWaitTime
long getLockWaitTime(java.util.Map<java.lang.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 notnull.- Throws:
java.lang.IllegalArgumentException- In case of invalid configuration.
-
getLockWaitTimeUnit
java.util.concurrent.TimeUnit getLockWaitTimeUnit(java.util.Map<java.lang.String,?> configuration)
Returns the unit of maximum amount of time based on configuration. Never returnsnullbut may throw in case of invalid configuration.- Parameters:
configuration- The configuration maps, must be notnull.- Throws:
java.lang.IllegalArgumentException- In case of invalid configuration.
-
-