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 IracEntryVersiongetIracVersionFromCacheEntry(CacheEntry<?, ?> entry) static voidlogUpdateDiscarded(Object key, IracMetadata metadata, LogSupplier logSupplier) static voidsetIracMetadata(CacheEntry<?, ?> entry, int segment, IracMetadata metadata, IracTombstoneManager versionGenerator, LogSupplier logSupplier) Stores theIracMetadataintoCacheEntry.static voidsetPrivateMetadata(CacheEntry<?, ?> entry, int segment, PrivateMetadata metadata, IracTombstoneManager versionGenerator, LogSupplier logSupplier) Same assetIracMetadata(CacheEntry, int, IracMetadata, IracTombstoneManager, LogSupplier)but it stores a "full"PrivateMetadatainstead ofIracMetadata.
-
Method Details
-
findIracMetadataFromCacheEntry
-
getIracVersionFromCacheEntry
-
setIracMetadata
public static void setIracMetadata(CacheEntry<?, ?> entry, int segment, IracMetadata metadata, IracTombstoneManager versionGenerator, LogSupplier logSupplier) Stores theIracMetadataintoCacheEntry.If the
CacheEntryis a remove, then the tombstone is added viaIracTombstoneManager.storeTombstone(int, Object, IracMetadata).- Parameters:
entry- TheCacheEntryto update.metadata- TheIracMetadatato store.versionGenerator- TheIracTombstoneManagerto update.logSupplier- TheLogSupplierto log theIracMetadataand 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"PrivateMetadatainstead 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- TheCacheEntryto update.metadata- ThePrivateMetadatato store.versionGenerator- TheIracTombstoneManagerto update.logSupplier- TheLogSupplierto log thePrivateMetadataand the key.
-
logUpdateDiscarded
-