Package org.infinispan.transaction.impl
Class WriteSkewHelper
java.lang.Object
org.infinispan.transaction.impl.WriteSkewHelper
Encapsulates write skew logic in maintaining version maps, etc.
- Since:
- 5.1
- Author:
- Manik Surtani
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
addVersionRead
(TxInvocationContext<?> ctx, CacheEntry<?, ?> entry, Object key, VersionGenerator versionGenerator, org.infinispan.util.logging.Log log) static IncrementableEntryVersion
incrementVersion
(CacheEntry<?, ?> entry, VersionGenerator versionGenerator) static Map<Object,
IncrementableEntryVersion> mergeEntryVersions
(Map<Object, IncrementableEntryVersion> entryVersions, Map<Object, IncrementableEntryVersion> updatedEntryVersions) static PrepareResponse
mergeInPrepareResponse
(Map<Object, IncrementableEntryVersion> versionsMap, PrepareResponse response) static void
mergePrepareResponses
(Response r, PrepareResponse aggregateResponse) performWriteSkewCheckAndReturnNewVersions
(org.infinispan.commands.tx.VersionedPrepareCommand prepareCommand, EntryLoader<?, ?> entryLoader, VersionGenerator versionGenerator, TxInvocationContext<?> context, WriteSkewHelper.KeySpecificLogic ksl, KeyPartitioner keyPartitioner) static IncrementableEntryVersion
versionFromEntry
(CacheEntry<?, ?> entry)
-
Field Details
-
ALWAYS_TRUE_LOGIC
-
-
Constructor Details
-
WriteSkewHelper
public WriteSkewHelper()
-
-
Method Details
-
mergePrepareResponses
-
mergeInPrepareResponse
public static PrepareResponse mergeInPrepareResponse(Map<Object, IncrementableEntryVersion> versionsMap, PrepareResponse response) -
mergeEntryVersions
public static Map<Object,IncrementableEntryVersion> mergeEntryVersions(Map<Object, IncrementableEntryVersion> entryVersions, Map<Object, IncrementableEntryVersion> updatedEntryVersions) -
performWriteSkewCheckAndReturnNewVersions
public static CompletionStage<Map<Object,IncrementableEntryVersion>> performWriteSkewCheckAndReturnNewVersions(org.infinispan.commands.tx.VersionedPrepareCommand prepareCommand, EntryLoader<?, ?> entryLoader, VersionGenerator versionGenerator, TxInvocationContext<?> context, WriteSkewHelper.KeySpecificLogic ksl, KeyPartitioner keyPartitioner) -
versionFromEntry
-
incrementVersion
public static IncrementableEntryVersion incrementVersion(CacheEntry<?, ?> entry, VersionGenerator versionGenerator) -
addVersionRead
public static void addVersionRead(TxInvocationContext<?> ctx, CacheEntry<?, ?> entry, Object key, VersionGenerator versionGenerator, org.infinispan.util.logging.Log log)
-