Mercurial > hg > blitz_condensed
comparison src/org/dancres/blitz/remote/txn/SpaceTxnUID.java @ 0:3dc0c5604566
Initial checkin of blitz 2.0 fcs - no installer yet.
author | Dan Creswell <dan.creswell@gmail.com> |
---|---|
date | Sat, 21 Mar 2009 11:00:06 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:3dc0c5604566 |
---|---|
1 package org.dancres.blitz.remote.txn; | |
2 | |
3 import org.dancres.blitz.lease.SpaceUID; | |
4 | |
5 /** | |
6 */ | |
7 public class SpaceTxnUID implements SpaceUID { | |
8 private long theMagic; | |
9 private long theId; | |
10 | |
11 SpaceTxnUID(long anId, long aMagic) { | |
12 theId = anId; | |
13 theMagic = aMagic; | |
14 } | |
15 | |
16 public boolean equals(Object anObject) { | |
17 if (anObject instanceof SpaceTxnUID) { | |
18 SpaceTxnUID myUID = (SpaceTxnUID) anObject; | |
19 | |
20 return ((theId == myUID.theId) && (theMagic == myUID.theMagic)); | |
21 } | |
22 | |
23 return false; | |
24 } | |
25 | |
26 long getId() { | |
27 return theId; | |
28 } | |
29 | |
30 long getMagic() { | |
31 return theMagic; | |
32 } | |
33 | |
34 public int hashCode() { | |
35 return (int) (theId ^ (theId >>> 32)); | |
36 } | |
37 | |
38 public String toString() { | |
39 return "LT:" + theId + "," + theMagic; | |
40 } | |
41 } |