Class CDORevisionManager.Request.Config
java.lang.Object
org.eclipse.emf.cdo.common.revision.CDORevisionManager.Request.Config
- Enclosing interface:
CDORevisionManager.Request
Immutable loading options shared by revision manager operations and modern revision loaders. The configuration is
intentionally a superset: an operation or loader ignores options that it does not support. The collection policy
is retained by reference, so concurrent reuse of a configuration also requires that policy implementation to be
thread-safe.
- Since:
- 4.37
- Author:
- Eike Stepper
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumControls whether a revision manager consults its cache before invoking its loader. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final CDORevisionManager.Request.ConfigThe default revision-loading configuration: cache then loader, no containment or lock-state prefetch, and the effective session collection policy.static final int -
Constructor Summary
ConstructorsConstructorDescriptionConfig(CDORevisionManager.Request.Config.LookupMode lookupMode, int prefetchDepth, boolean prefetchLockStates) Creates an immutable configuration using an unchunked scalar reference chunk.Config(CDORevisionManager.Request.Config.LookupMode lookupMode, int prefetchDepth, boolean prefetchLockStates, int referenceChunk) Creates an immutable configuration. -
Method Summary
Modifier and TypeMethodDescriptionReturns the lookup mode.intReturns the containment prefetch depth, which is ignored by operations that do not support containment prefetch.intReturns the scalar reference chunk for legacy loading paths.booleanReturns whether lock states should be prefetched where supported.
-
Field Details
-
DEFAULT
The default revision-loading configuration: cache then loader, no containment or lock-state prefetch, and the effective session collection policy.- Since:
- 4.37
-
REFERENCE_CHUNK_UNSPECIFIED
public static final int REFERENCE_CHUNK_UNSPECIFIED- See Also:
-
-
Constructor Details
-
Config
public Config(CDORevisionManager.Request.Config.LookupMode lookupMode, int prefetchDepth, boolean prefetchLockStates) Creates an immutable configuration using an unchunked scalar reference chunk.- Parameters:
lookupMode- the source-selection modeprefetchDepth- the containment prefetch depthprefetchLockStates- whether lock states are prefetched where supported
-
Config
public Config(CDORevisionManager.Request.Config.LookupMode lookupMode, int prefetchDepth, boolean prefetchLockStates, int referenceChunk) Creates an immutable configuration.- Parameters:
lookupMode- the source-selection modeprefetchDepth- the containment prefetch depth; operations without containment prefetch support ignore itprefetchLockStates- whether lock states are prefetched where supportedreferenceChunk- the scalar reference chunk for legacy loading paths
-
-
Method Details
-
getLookupMode
Returns the lookup mode.- Returns:
- the cache and loader source-selection mode
-
getPrefetchDepth
public int getPrefetchDepth()Returns the containment prefetch depth, which is ignored by operations that do not support containment prefetch.- Returns:
- the number of containment levels to prefetch, or a
CDORevisiondepth constant
-
isPrefetchLockStates
public boolean isPrefetchLockStates()Returns whether lock states should be prefetched where supported.- Returns:
trueif lock states should be prefetched
-
getReferenceChunk
public int getReferenceChunk()Returns the scalar reference chunk for legacy loading paths.- Returns:
- the scalar reference chunk
-