Class NamedLockFactoryAdapterFactoryImpl

  • All Implemented Interfaces:
    NamedLockFactoryAdapterFactory, org.eclipse.aether.spi.locator.Service

    @Singleton
    @Named
    public class NamedLockFactoryAdapterFactoryImpl
    extends java.lang.Object
    implements NamedLockFactoryAdapterFactory, org.eclipse.aether.spi.locator.Service
    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
    • Method Detail

      • initService

        public void initService​(org.eclipse.aether.spi.locator.ServiceLocator locator)
        Specified by:
        initService in interface org.eclipse.aether.spi.locator.Service
      • getFactoryName

        protected java.lang.String getFactoryName​(org.eclipse.aether.RepositorySystemSession session)
        Returns the selected (user configured or default) named lock factory name, never null.
      • getDefaultFactoryName

        protected java.lang.String getDefaultFactoryName()
        Returns the default named lock factory name, never null.
      • getNameMapperName

        protected java.lang.String getNameMapperName​(org.eclipse.aether.RepositorySystemSession session)
        Returns the selected (user configured or default) name mapper name, never null.
      • getDefaultNameMapperName

        protected java.lang.String getDefaultNameMapperName()
        Returns the default name mapper name, never null.
      • selectFactory

        protected org.eclipse.aether.named.NamedLockFactory selectFactory​(java.lang.String factoryName)
        Selects a named lock factory, never returns null.
      • selectNameMapper

        protected NameMapper selectNameMapper​(java.lang.String nameMapperName)
        Selects a name mapper, never returns null.
      • shutdown

        protected void shutdown()
        To be invoked on repository system shut down. This method will shut down each NamedLockFactory.