Package org.infinispan.util
Class IracUtils
- java.lang.Object
-
- org.infinispan.util.IracUtils
-
public final class IracUtils extends Object
Utility methods from IRAC (async cross-site replication)- Since:
- 12.0
- Author:
- Pedro Ruivo
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Optional<IracMetadata>
findIracMetadataFromCacheEntry(CacheEntry<?,?> entry)
static IracEntryVersion
getIracVersionFromCacheEntry(CacheEntry<?,?> entry)
static void
logUpdateDiscarded(Object key, IracMetadata metadata, LogSupplier logSupplier)
static void
setIracMetadata(CacheEntry<?,?> entry, int segment, IracMetadata metadata, IracTombstoneManager versionGenerator, LogSupplier logSupplier)
Stores theIracMetadata
intoCacheEntry
.static void
setPrivateMetadata(CacheEntry<?,?> entry, int segment, PrivateMetadata metadata, IracTombstoneManager versionGenerator, LogSupplier logSupplier)
Same assetIracMetadata(CacheEntry, int, IracMetadata, IracTombstoneManager, LogSupplier)
but it stores a "full"PrivateMetadata
instead ofIracMetadata
.
-
-
-
Method Detail
-
findIracMetadataFromCacheEntry
public static Optional<IracMetadata> findIracMetadataFromCacheEntry(CacheEntry<?,?> entry)
-
getIracVersionFromCacheEntry
public static IracEntryVersion getIracVersionFromCacheEntry(CacheEntry<?,?> entry)
-
setIracMetadata
public static void setIracMetadata(CacheEntry<?,?> entry, int segment, IracMetadata metadata, IracTombstoneManager versionGenerator, LogSupplier logSupplier)
Stores theIracMetadata
intoCacheEntry
.If the
CacheEntry
is a remove, then the tombstone is added viaIracTombstoneManager.storeTombstone(int, Object, IracMetadata)
.- Parameters:
entry
- TheCacheEntry
to update.metadata
- TheIracMetadata
to store.versionGenerator
- TheIracTombstoneManager
to update.logSupplier
- TheLogSupplier
to log theIracMetadata
and the key.
-
setPrivateMetadata
public static void setPrivateMetadata(CacheEntry<?,?> entry, int segment, PrivateMetadata metadata, IracTombstoneManager versionGenerator, LogSupplier logSupplier)
Same assetIracMetadata(CacheEntry, int, IracMetadata, IracTombstoneManager, LogSupplier)
but it stores a "full"PrivateMetadata
instead ofIracMetadata
.This method is invoked to set the version from remote site updates. Note that the tombstone is not stored in case of a remove operation.
- Parameters:
entry
- TheCacheEntry
to update.metadata
- ThePrivateMetadata
to store.versionGenerator
- TheIracTombstoneManager
to update.logSupplier
- TheLogSupplier
to log thePrivateMetadata
and the key.
-
logUpdateDiscarded
public static void logUpdateDiscarded(Object key, IracMetadata metadata, LogSupplier logSupplier)
-
-