Class IracEntryVersion
- java.lang.Object
-
- org.infinispan.container.versioning.irac.IracEntryVersion
-
@ProtoTypeId(1006) public class IracEntryVersion extends Object
An entry version for the IRAC algorithm (async cross site replication).It is represented as a vector clock where each site keeps it version.
The site version is composed as a pair (topology id, version).
- Since:
- 11.0
- Author:
- Pedro Ruivo
- See Also:
TopologyIracVersion
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
IracEntryVersion.MapEntry
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description InequalVersionComparisonResult
compareTo(IracEntryVersion other)
Compares this instance with anotherIracEntryVersion
instance.boolean
equals(Object o)
void
forEach(BiConsumer<ByteString,TopologyIracVersion> consumer)
Iterates over all entries of this version as pairs (site name, site version).int
getTopology(ByteString siteName)
TopologyIracVersion
getVersion(ByteString siteName)
int
hashCode()
IracEntryVersion
increment(ByteString siteName, int topologyId)
IracEntryVersion
merge(IracEntryVersion other)
static IracEntryVersion
newVersion(ByteString site, TopologyIracVersion version)
String
toString()
-
-
-
Method Detail
-
newVersion
public static IracEntryVersion newVersion(ByteString site, TopologyIracVersion version)
-
forEach
public void forEach(BiConsumer<ByteString,TopologyIracVersion> consumer)
Iterates over all entries of this version as pairs (site name, site version).- Parameters:
consumer
- TheBiConsumer
.
-
compareTo
public InequalVersionComparisonResult compareTo(IracEntryVersion other)
Compares this instance with anotherIracEntryVersion
instance.- Parameters:
other
- The otherIracEntryVersion
instance.- Returns:
- A
InequalVersionComparisonResult
instance with the compare result.
-
merge
public IracEntryVersion merge(IracEntryVersion other)
-
getVersion
public TopologyIracVersion getVersion(ByteString siteName)
-
getTopology
public int getTopology(ByteString siteName)
-
increment
public IracEntryVersion increment(ByteString siteName, int topologyId)
-
-