Class DefaultSyncContextFactory
java.lang.Object
org.eclipse.aether.internal.impl.synccontext.DefaultSyncContextFactory
- All Implemented Interfaces:
Service,SyncContextFactory
@Singleton
@Named
public final class DefaultSyncContextFactory
extends Object
implements SyncContextFactory, Service
Default
SyncContextFactory implementation that uses named locks.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConstructor used with DI, where factories are injected and selected based on key. -
Method Summary
Modifier and TypeMethodDescriptionvoidinitService(ServiceLocator locator) Provides the opportunity to initialize this service and to acquire other services for its operation from the locator.newInstance(RepositorySystemSession session, boolean shared) Creates a new synchronization context.voidshutdown()
-
Field Details
-
namedLockFactoryAdapter
-
-
Constructor Details
-
DefaultSyncContextFactory
Constructor used with DI, where factories are injected and selected based on key. -
DefaultSyncContextFactory
public DefaultSyncContextFactory()
-
-
Method Details
-
initService
Description copied from interface:ServiceProvides the opportunity to initialize this service and to acquire other services for its operation from the locator. A service must not save the reference to the provided service locator.- Specified by:
initServicein interfaceService- Parameters:
locator- The service locator, must not benull.
-
newInstance
Description copied from interface:SyncContextFactoryCreates a new synchronization context.- Specified by:
newInstancein interfaceSyncContextFactory- Parameters:
session- The repository session during which the context will be used, must not benull.shared- A flag indicating whether access to the artifacts/metadata associated with the new context can be shared among concurrent readers or whether access needs to be exclusive to the calling thread.- Returns:
- The synchronization context, never
null. - See Also:
-
shutdown
@PreDestroy public void shutdown()
-