Class AffinityTopologyVersion
- java.lang.Object
-
- org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion
-
- All Implemented Interfaces:
Externalizable,Serializable,Comparable<AffinityTopologyVersion>,Message
public class AffinityTopologyVersion extends Object implements Comparable<AffinityTopologyVersion>, Externalizable, Message
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static AffinityTopologyVersionNONEstatic AffinityTopologyVersionZERO-
Fields inherited from interface org.apache.ignite.plugin.extensions.communication.Message
DIRECT_TYPE_SIZE
-
-
Constructor Summary
Constructors Constructor Description AffinityTopologyVersion()Empty constructor required byExternalizable.AffinityTopologyVersion(long topVer)AffinityTopologyVersion(long topVer, int minorTopVer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanafter(AffinityTopologyVersion topVer)booleanbefore(AffinityTopologyVersion topVer)intcompareTo(AffinityTopologyVersion o)shortdirectType()Gets message type.booleanequals(Object o)bytefieldsCount()Gets fields count.inthashCode()booleaninitialized()booleanisBetween(AffinityTopologyVersion lower, AffinityTopologyVersion upper)intminorTopologyVersion()AffinityTopologyVersionnextMinorVersion()voidonAckReceived()Method called when ack message received.voidreadExternal(ObjectInput in)booleanreadFrom(ByteBuffer buf, MessageReader reader)Reads this message from provided byte buffer.longtopologyVersion()StringtoString()voidwriteExternal(ObjectOutput out)booleanwriteTo(ByteBuffer buf, MessageWriter writer)Writes this message to provided byte buffer.
-
-
-
Field Detail
-
NONE
public static final AffinityTopologyVersion NONE
-
ZERO
public static final AffinityTopologyVersion ZERO
-
-
Constructor Detail
-
AffinityTopologyVersion
public AffinityTopologyVersion()
Empty constructor required byExternalizable.
-
AffinityTopologyVersion
public AffinityTopologyVersion(long topVer)
- Parameters:
topVer- Topology version.
-
AffinityTopologyVersion
public AffinityTopologyVersion(long topVer, int minorTopVer)- Parameters:
topVer- Topology version.minorTopVer- Minor topology version.
-
-
Method Detail
-
initialized
public boolean initialized()
-
nextMinorVersion
public AffinityTopologyVersion nextMinorVersion()
- Returns:
- Topology version with incremented minor version.
-
topologyVersion
public long topologyVersion()
- Returns:
- Topology version.
-
minorTopologyVersion
public int minorTopologyVersion()
- Returns:
- Minor topology version.
-
compareTo
public int compareTo(AffinityTopologyVersion o)
- Specified by:
compareToin interfaceComparable<AffinityTopologyVersion>
-
isBetween
public final boolean isBetween(AffinityTopologyVersion lower, AffinityTopologyVersion upper)
- Parameters:
lower- Lower bound.upper- Upper bound.- Returns:
Trueif this topology version is within provided bounds (inclusive).
-
after
public final boolean after(AffinityTopologyVersion topVer)
- Parameters:
topVer- Test version.- Returns:
Trueif this topology happens strictly after thantopVer.
-
before
public final boolean before(AffinityTopologyVersion topVer)
- Parameters:
topVer- Test version.- Returns:
Trueif this topology happens strictly before thantopVer.
-
onAckReceived
public void onAckReceived()
Method called when ack message received.- Specified by:
onAckReceivedin interfaceMessage
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
writeTo
public boolean writeTo(ByteBuffer buf, MessageWriter writer)
Writes this message to provided byte buffer.
-
readFrom
public boolean readFrom(ByteBuffer buf, MessageReader reader)
Reads this message from provided byte buffer.
-
directType
public short directType()
Gets message type.- Specified by:
directTypein interfaceMessage- Returns:
- Message type.
-
fieldsCount
public byte fieldsCount()
Gets fields count.- Specified by:
fieldsCountin interfaceMessage- Returns:
- Fields count.
-
-