Package org.infinispan.util
Class IracUtils
java.lang.Object
org.infinispan.util.IracUtils
Utility methods from IRAC (async cross-site replication)
- Since:
- 12.0
- Author:
- Pedro Ruivo
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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 Details
-
findIracMetadataFromCacheEntry
-
getIracVersionFromCacheEntry
-
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
-