public class CommitToken extends java.lang.Object implements java.io.Serializable, java.lang.Comparable<CommitToken>
Since CommitTokens identify a point in the serialized transaction schedule
created on the master, it's meaningful to compare commit tokens,
as described in the compareTo(CommitToken)
method below.
CommitTokens are obtained from Transaction.getCommitToken()
CommitPointConsistencyPolicy
,
Serialized FormConstructor and Description |
---|
CommitToken(java.util.UUID repenvUUID,
long vlsn) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(CommitToken other)
Implements the Comparable interface.
|
boolean |
equals(java.lang.Object obj) |
java.util.UUID |
getRepenvUUID() |
long |
getVLSN() |
int |
hashCode() |
java.lang.String |
toString() |
public CommitToken(java.util.UUID repenvUUID, long vlsn)
repenvUUID
- identifies the replicated environment associated with
the vlsn
vlsn
- the vlsn representing the state of the database.public java.util.UUID getRepenvUUID()
public long getVLSN()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int compareTo(CommitToken other)
CommitToken(1) < CommitToken(2) implies that CommitToken(1) represents a state of the database that preceded the state defined by CommitToken(2).
compareTo
in interface java.lang.Comparable<CommitToken>
java.lang.IllegalArgumentException
- if two tokens from different
environments are compared.public java.lang.String toString()
toString
in class java.lang.Object
Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.