@Singleton @Named public final class NamedLockFactorySelector extends Object
NamedLockFactory and NameMapper that selects and exposes selected ones. Essentially
all the named locks configuration is here.| Modifier and Type | Field and Description |
|---|---|
static long |
TIME |
static TimeUnit |
TIME_UNIT |
| Constructor and Description |
|---|
NamedLockFactorySelector()
Default constructor for ServiceLocator.
|
NamedLockFactorySelector(Map<String,NamedLockFactory> factories,
Map<String,NameMapper> nameMappers)
Constructor used with DI, where factories are injected and selected based on key.
|
| Modifier and Type | Method and Description |
|---|---|
NamedLockFactory |
getSelectedNamedLockFactory()
Returns the selected
NamedLockFactory, never null. |
NameMapper |
getSelectedNameMapper()
Returns the selected
NameMapper, never null. |
@Inject public NamedLockFactorySelector(Map<String,NamedLockFactory> factories, Map<String,NameMapper> nameMappers)
public NamedLockFactorySelector()
public NamedLockFactory getSelectedNamedLockFactory()
NamedLockFactory, never null.public NameMapper getSelectedNameMapper()
NameMapper, never null.Copyright © 2010–2021 The Apache Software Foundation. All rights reserved.