public class EntryFactoryImpl extends Object implements EntryFactory
EntryFactory
implementation to be used for optimistic locking scheme.Modifier and Type | Field and Description |
---|---|
protected boolean |
clusterModeWriteSkewCheck |
protected boolean |
useRepeatableRead |
Constructor and Description |
---|
EntryFactoryImpl() |
Modifier and Type | Method and Description |
---|---|
protected MVCCEntry |
createWrappedEntry(Object key,
CacheEntry cacheEntry,
InvocationContext context,
Metadata providedMetadata,
boolean isForInsert,
boolean forRemoval,
boolean skipRead) |
void |
init() |
void |
injectDependencies(DataContainer dataContainer,
Configuration configuration,
CacheNotifier notifier,
DistributionManager distributionManager) |
MVCCEntry |
wrapEntryForClear(InvocationContext ctx,
Object key)
Used for wrapping individual keys when clearing the cache.
|
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)
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.
|
protected boolean useRepeatableRead
protected boolean clusterModeWriteSkewCheck
public void injectDependencies(DataContainer dataContainer, Configuration configuration, CacheNotifier notifier, DistributionManager distributionManager)
public void init()
public final CacheEntry wrapEntryForReading(InvocationContext ctx, Object key) throws InterruptedException
EntryFactory
CacheEntry
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 EntryFactory
ctx
- current invocation contextkey
- key to look up and wrapInterruptedException
- when things go wrong, usually trying to acquire a lockpublic final MVCCEntry wrapEntryForClear(InvocationContext ctx, Object key) throws InterruptedException
EntryFactory
wrapEntryForClear
in interface EntryFactory
InterruptedException
public final MVCCEntry wrapEntryForReplace(InvocationContext ctx, ReplaceCommand cmd) throws InterruptedException
EntryFactory
wrapEntryForReplace
in interface EntryFactory
InterruptedException
public final MVCCEntry wrapEntryForRemove(InvocationContext ctx, Object key, boolean skipRead, boolean forInvalidation, boolean forceWrap) throws InterruptedException
EntryFactory
wrapEntryForRemove
in interface EntryFactory
skipRead
- if true
, if the key is not read during the remove operation. Only used with Repeatable
Read + Write Skew + Versioning + Cluster.InterruptedException
public MVCCEntry wrapEntryForPut(InvocationContext ctx, Object key, InternalCacheEntry icEntry, boolean undeleteIfNeeded, FlagAffectedCommand cmd, boolean skipRead) throws InterruptedException
EntryFactory
wrapEntryForPut
in interface EntryFactory
skipRead
- if true
, if the key is not read during the put operation. Only used with Repeatable Read +
Write Skew + Versioning + Cluster.InterruptedException
public CacheEntry wrapEntryForDelta(InvocationContext ctx, Object deltaKey, Delta delta) throws InterruptedException
EntryFactory
wrapEntryForDelta
in interface EntryFactory
InterruptedException
protected MVCCEntry createWrappedEntry(Object key, CacheEntry cacheEntry, InvocationContext context, Metadata providedMetadata, boolean isForInsert, boolean forRemoval, boolean skipRead)
Copyright © 2014 JBoss, a division of Red Hat. All Rights Reserved.