Class NamedLockFactoryAdapterFactoryImpl
java.lang.Object
org.eclipse.aether.internal.impl.synccontext.named.NamedLockFactoryAdapterFactoryImpl
- All Implemented Interfaces:
NamedLockFactoryAdapterFactory
@Singleton
@Named
public class NamedLockFactoryAdapterFactoryImpl
extends Object
implements NamedLockFactoryAdapterFactory
Default implementation of
NamedLockFactoryAdapterFactory. This implementation creates new instances of the
adapter on every call. In turn, on shutdown, it will shut down all existing named lock factories. This is merely for
simplicity, to not have to track "used" named lock factories, while it exposes all available named lock factories to
callers.
Most members and methods of this class are protected. It is meant to be extended in case of need to customize its behavior. An exception from this are private static methods, mostly meant to provide out of the box defaults and to be used when no Eclipse Sisu component container is used.
- Since:
- 1.9.1
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDeprecated.static final StringName of the name mapper to use in session.static final Stringprotected final Stringprotected final Map<String, LockingInhibitorFactory> protected final org.slf4j.Loggerprotected final NamedLockFactorySelectorprotected final Map<String, NameMapper> -
Constructor Summary
ConstructorsConstructorDescriptionNamedLockFactoryAdapterFactoryImpl(NamedLockFactorySelector namedLockFactorySelector, Map<String, NameMapper> nameMappers, String defaultNameMapperName, Map<String, LockingInhibitorFactory> lockingInhibitorFactories) NamedLockFactoryAdapterFactoryImpl(NamedLockFactorySelector namedLockFactorySelector, Map<String, NameMapper> nameMappers, Map<String, LockingInhibitorFactory> lockingInhibitorFactories) -
Method Summary
Modifier and TypeMethodDescriptionprotected NamedLockFactoryAdaptercreateAdapter(RepositorySystemSession session) Creates a new adapter instance, never returnsnull.getAdapter(RepositorySystemSession session) Current implementation memoize instance in session or delegates tocreateAdapter(RepositorySystemSession).protected StringReturns the default name mapper name, nevernull.protected StringgetNameMapperName(RepositorySystemSession session) Returns the selected (user configured or default) name mapper name, nevernull.protected NameMapperselectNameMapper(RepositorySystemSession session, String nameMapperName) Selects a name mapper, never returnsnull.
-
Field Details
-
DEFAULT_NAME_MAPPER_NAME
- See Also:
-
CONFIG_PROP_FACTORY_KEY
Deprecated.Name of the lock factory to use in session. Out of the box supported ones are "file-lock", "rwlock-local", "semaphore-local", "noop". By adding extensions one can extend available lock factories (for example IPC locking). Deprecated: useaether.system.named...configuration instead.- See Also:
- Sourced from:
RepositorySystemSession.getConfigProperties()- Value type:
String
-
CONFIG_PROP_NAME_MAPPER_KEY
Name of the name mapper to use in session. Out of the box supported ones are "static", "gav", "gaecv", "file-gav", "file-gaecv", "file-hgav", "file-hgaecv", "file-static" and "discriminating".- See Also:
- Sourced from:
RepositorySystemSession.getConfigProperties()- Value type:
String- Default value:
DEFAULT_NAME_MAPPER_NAME
-
logger
-
namedLockFactorySelector
-
nameMappers
-
defaultNameMapperName
-
lockingInhibitorFactories
-
-
Constructor Details
-
NamedLockFactoryAdapterFactoryImpl
@Inject public NamedLockFactoryAdapterFactoryImpl(NamedLockFactorySelector namedLockFactorySelector, Map<String, NameMapper> nameMappers, Map<String, LockingInhibitorFactory> lockingInhibitorFactories) -
NamedLockFactoryAdapterFactoryImpl
public NamedLockFactoryAdapterFactoryImpl(NamedLockFactorySelector namedLockFactorySelector, Map<String, NameMapper> nameMappers, String defaultNameMapperName, Map<String, LockingInhibitorFactory> lockingInhibitorFactories)
-
-
Method Details
-
getAdapter
Current implementation memoize instance in session or delegates tocreateAdapter(RepositorySystemSession).- Specified by:
getAdapterin interfaceNamedLockFactoryAdapterFactory
-
createAdapter
Creates a new adapter instance, never returnsnull. -
getNameMapperName
Returns the selected (user configured or default) name mapper name, nevernull. -
getDefaultNameMapperName
Returns the default name mapper name, nevernull. -
selectNameMapper
Selects a name mapper, never returnsnull. Applies inhibitors.
-