Class NoOpIracVersionGenerator
java.lang.Object
org.infinispan.container.versioning.irac.NoOpIracVersionGenerator
- All Implemented Interfaces:
Lifecycle,IracVersionGenerator
A no-op implementation of
IracVersionGenerator for caches without asynchronous remote site backups.- Since:
- 11.0
- Author:
- Pedro Ruivo
-
Method Summary
Modifier and TypeMethodDescriptiongenerateMetadataWithCurrentVersion(int segment) Generate a newIracMetadatafor a givensegment.generateNewMetadata(int segment) Generates a newIracMetadatafor a givensegment.generateNewMetadata(int segment, IracEntryVersion versionSeen) Same asIracVersionGenerator.generateNewMetadata(int)but it makes sure the new version is higher thanversionSeen.static NoOpIracVersionGeneratorvoidonTopologyChange(CacheTopology newTopology) Invoked when a topology change occurs in the cluster.voidstart()Invoked on component startvoidstop()Invoked on component stopvoidupdateVersion(int segment, IracEntryVersion remoteVersion) Updates the version for thesegmentwith a newremoteVersionseen.
-
Method Details
-
getInstance
-
generateNewMetadata
Description copied from interface:IracVersionGeneratorGenerates a newIracMetadatafor a givensegment.The
IracEntryVersioncreated is always higher than the previous one for the samesegment.- Specified by:
generateNewMetadatain interfaceIracVersionGenerator- Parameters:
segment- The segment.- Returns:
- The
IracMetadatacreated.
-
generateMetadataWithCurrentVersion
Description copied from interface:IracVersionGeneratorGenerate a newIracMetadatafor a givensegment.The
IracEntryVersioncreated will be the same as the previous one for the samesegment. If there was no version prior then it will create an initial version.- Specified by:
generateMetadataWithCurrentVersionin interfaceIracVersionGenerator- Parameters:
segment- The segment.- Returns:
- The
IracMetadatacreated.
-
generateNewMetadata
Description copied from interface:IracVersionGeneratorSame asIracVersionGenerator.generateNewMetadata(int)but it makes sure the new version is higher thanversionSeen.- Specified by:
generateNewMetadatain interfaceIracVersionGenerator- Parameters:
segment- The segment.versionSeen- TheIracEntryVersionseen before. Can benull.- Returns:
- The
IracMetadatacreated.
-
updateVersion
Description copied from interface:IracVersionGeneratorUpdates the version for thesegmentwith a newremoteVersionseen.This method should merge both the current version internally stored and the
remoteVersionto achieve anIracEntryVersionhigher than both.- Specified by:
updateVersionin interfaceIracVersionGenerator- Parameters:
segment- The segment.remoteVersion- The remoteIracEntryVersionreceived.
-
onTopologyChange
Description copied from interface:IracVersionGeneratorInvoked when a topology change occurs in the cluster.- Specified by:
onTopologyChangein interfaceIracVersionGenerator- Parameters:
newTopology- The newCacheTopology
-
start
public void start()Description copied from interface:LifecycleInvoked on component start -
stop
public void stop()Description copied from interface:LifecycleInvoked on component stop
-