public class CommitToken extends Object implements Serializable, 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(UUID repenvUUID,
long vlsn) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(CommitToken other)
Implements the Comparable interface.
|
boolean |
equals(Object obj) |
UUID |
getRepenvUUID() |
long |
getVLSN() |
int |
hashCode() |
String |
toString() |
public CommitToken(UUID repenvUUID, long vlsn)
repenvUUID
- identifies the replicated environment associated with
the vlsn
vlsn
- the vlsn representing the state of the database.public UUID getRepenvUUID()
public long getVLSN()
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 Comparable<CommitToken>
IllegalArgumentException
- if two tokens from different
environments are compared.Copyright (c) 2002, 2015 Oracle and/or its affiliates. All rights reserved.