public class EntryFactoryImpl extends Object implements EntryFactory
EntryFactory implementation to be used for optimistic locking scheme.EntryFactory.Wrap| Modifier and Type | Field and Description |
|---|---|
protected boolean |
useRepeatableRead |
| Constructor and Description |
|---|
EntryFactoryImpl() |
| Modifier and Type | Method and Description |
|---|---|
protected MVCCEntry |
createWrappedEntry(Object key,
CacheEntry cacheEntry,
InvocationContext context,
boolean skipRead) |
void |
init() |
void |
injectDependencies(DataContainer dataContainer,
Configuration configuration,
DistributionManager distributionManager,
TimeService timeService) |
MVCCEntry |
wrapEntryForClear(InvocationContext ctx,
Object key)
Deprecated.
|
CacheEntry |
wrapEntryForDelta(InvocationContext ctx,
Object deltaKey,
Delta delta)
Used for wrapping Delta entry to be applied to DeltaAware object stored in cache.
|
MVCCEntry |
wrapEntryForPut(InvocationContext ctx,
Object key,
InternalCacheEntry icEntry,
boolean undeleteIfNeeded,
FlagAffectedCommand cmd,
boolean skipRead)
Used for wrapping a cache entry for addition to cache.
|
CacheEntry |
wrapEntryForReading(InvocationContext ctx,
Object key,
CacheEntry existing)
Wraps an entry for reading.
|
MVCCEntry |
wrapEntryForRemove(InvocationContext ctx,
Object key,
boolean skipRead,
boolean forInvalidation,
boolean forceWrap)
Used for wrapping a cache entry for removal.
|
MVCCEntry |
wrapEntryForReplace(InvocationContext ctx,
ReplaceCommand cmd)
Used for wrapping a cache entry for replacement.
|
MVCCEntry |
wrapEntryForWriting(InvocationContext ctx,
Object key,
EntryFactory.Wrap wrap,
boolean skipRead,
boolean ignoreOwnership)
Insert an entry that exists in the data container into the context.
|
boolean |
wrapExternalEntry(InvocationContext ctx,
Object key,
CacheEntry externalEntry,
EntryFactory.Wrap wrap,
boolean skipRead)
Insert an external entry (e.g.
|
public void injectDependencies(DataContainer dataContainer, Configuration configuration, DistributionManager distributionManager, TimeService timeService)
public void init()
public final CacheEntry wrapEntryForReading(InvocationContext ctx, Object key, CacheEntry existing)
EntryFactoryCacheEntry but certain combinations of isolation
levels and the presence of an ongoing JTA transaction may force this to be a proper, wrapped MVCCEntry. The entry
is also typically placed in the invocation context.wrapEntryForReading in interface EntryFactoryctx - current invocation contextkey - key to look up and wrap@Deprecated public final MVCCEntry wrapEntryForClear(InvocationContext ctx, Object key) throws InterruptedException
EntryFactorywrapEntryForClear in interface EntryFactoryInterruptedExceptionpublic final MVCCEntry wrapEntryForReplace(InvocationContext ctx, ReplaceCommand cmd) throws InterruptedException
EntryFactorywrapEntryForReplace in interface EntryFactoryInterruptedExceptionpublic final MVCCEntry wrapEntryForRemove(InvocationContext ctx, Object key, boolean skipRead, boolean forInvalidation, boolean forceWrap) throws InterruptedException
EntryFactorywrapEntryForRemove in interface EntryFactoryskipRead - if true, if the key is not read during the remove operation. Only used with Repeatable
Read + Write Skew + Versioning + Cluster.InterruptedExceptionpublic MVCCEntry wrapEntryForPut(InvocationContext ctx, Object key, InternalCacheEntry icEntry, boolean undeleteIfNeeded, FlagAffectedCommand cmd, boolean skipRead)
EntryFactorywrapEntryForPut in interface EntryFactoryundeleteIfNeeded - IgnoredskipRead - if true, if the key is not read during the put operation. Only used with Repeatable Read +public MVCCEntry wrapEntryForWriting(InvocationContext ctx, Object key, EntryFactory.Wrap wrap, boolean skipRead, boolean ignoreOwnership)
EntryFactorywrapEntryForWriting in interface EntryFactorypublic boolean wrapExternalEntry(InvocationContext ctx, Object key, CacheEntry externalEntry, EntryFactory.Wrap wrap, boolean skipRead)
EntryFactorywrapExternalEntry in interface EntryFactorytrue if the context entry was modified, false otherwise.public CacheEntry wrapEntryForDelta(InvocationContext ctx, Object deltaKey, Delta delta)
EntryFactorywrapEntryForDelta in interface EntryFactoryprotected MVCCEntry createWrappedEntry(Object key, CacheEntry cacheEntry, InvocationContext context, boolean skipRead)
Copyright © 2024 JBoss, a division of Red Hat. All rights reserved.