Package org.eclipse.aether.synccontext
Class GlobalSyncContextFactory
- java.lang.Object
-
- org.eclipse.aether.synccontext.GlobalSyncContextFactory
-
- All Implemented Interfaces:
SyncContextFactory
@Named @Priority(2147483647) @Singleton public class GlobalSyncContextFactory extends java.lang.Object implements SyncContextFactory
A singleton factory to create synchronization contexts using a global lock based onReentrantReadWriteLock. Explicit artifacts and metadata passed are ignored.Note: This component is still considered to be experimental, use with caution!
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static classGlobalSyncContextFactory.GlobalSyncContext
-
Field Summary
Fields Modifier and Type Field Description private java.util.concurrent.locks.ReentrantReadWriteLocklock
-
Constructor Summary
Constructors Constructor Description GlobalSyncContextFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SyncContextnewInstance(RepositorySystemSession session, boolean shared)Creates a new synchronization context.
-
-
-
Method Detail
-
newInstance
public SyncContext newInstance(RepositorySystemSession session, boolean shared)
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:
RepositorySystem.newSyncContext(RepositorySystemSession, boolean)
-
-