Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Berkeley DB Java Edition version 4.0.103
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sleepycat.je
Class CommitToken

    java.lang.Object
      com.sleepycat.je.CommitToken

All Implemented Interfaces:
  Serializable, Comparable<CommitToken>

    public class CommitToken

extends Object
implements Serializable, Comparable<CommitToken>

Defines an opaque token that can be used to identify a specific transaction commit in a replicated environment. It's unique relative to its environment.

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()`

See Also:
  `CommitPointConsistencyPolicy`, Serialized Form

Method Summary
`int` | `compareTo(CommitToken other)` Implements the Comparable interface.
`boolean` | `equals(Object obj)`
`UUID` | `getRepenvUUID()`
`long` | `getVLSN()`
`int` | `hashCode()`
`String` | `toString()`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Method Detail

### getRepenvUUID

    public UUID getRepenvUUID()

### getVLSN

    public long getVLSN()

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `Object`

### equals

    public boolean equals(Object obj)

  Overrides:
    `equals` in class `Object`

### compareTo

    public int compareTo(CommitToken other)

  Implements the Comparable interface. Note that it's not meaningful to compare commit tokens across environments, since they represent states in unrelated serialized transaction streams.

  CommitToken(1) < CommitToken(2) implies that CommitToken(1) represents a state of the database that preceded the state defined by CommitToken(2).

  Specified by:
    `compareTo` in interface `Comparable<CommitToken>`
  Throws:
    `IllegalArgumentException` - if two tokens from different environments are compared.

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Berkeley DB Java Edition version 4.0.103
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (c) 2004-2010 Oracle. All rights reserved.