01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright
03: * notice. All rights reserved.
04: */
05: package com.tc.object.gtx;
06:
07: import com.tc.util.AbstractIdentifier;
08:
09: public class GlobalTransactionID extends AbstractIdentifier {
10:
11: public static final GlobalTransactionID NULL_ID = new GlobalTransactionID();
12:
13: public GlobalTransactionID(long id) {
14: super (id);
15: }
16:
17: private GlobalTransactionID() {
18: super ();
19: }
20:
21: public String getIdentifierType() {
22: return "GlobalTransactionID";
23: }
24:
25: public boolean lessThan(GlobalTransactionID compare) {
26: return isNull() ? true : toLong() < compare.toLong();
27: }
28:
29: public GlobalTransactionID next() {
30: return new GlobalTransactionID(toLong() + 1);
31: }
32:
33: }
|