Mercurial > hg > blitz_condensed
annotate src/org/dancres/blitz/txn/LogVersion.java @ 22:b7e52953b7a6
Add some cache/memory statistics to help spot potential exhaustion and other tuning issues.
author | Dan Creswell <dan.creswell@gmail.com> |
---|---|
date | Fri, 28 Aug 2009 17:23:33 +0100 |
parents | 3dc0c5604566 |
children |
rev | line source |
---|---|
0
3dc0c5604566
Initial checkin of blitz 2.0 fcs - no installer yet.
Dan Creswell <dan.creswell@gmail.com>
parents:
diff
changeset
|
1 package org.dancres.blitz.txn; |
3dc0c5604566
Initial checkin of blitz 2.0 fcs - no installer yet.
Dan Creswell <dan.creswell@gmail.com>
parents:
diff
changeset
|
2 |
3dc0c5604566
Initial checkin of blitz 2.0 fcs - no installer yet.
Dan Creswell <dan.creswell@gmail.com>
parents:
diff
changeset
|
3 import java.io.Serializable; |
3dc0c5604566
Initial checkin of blitz 2.0 fcs - no installer yet.
Dan Creswell <dan.creswell@gmail.com>
parents:
diff
changeset
|
4 |
3dc0c5604566
Initial checkin of blitz 2.0 fcs - no installer yet.
Dan Creswell <dan.creswell@gmail.com>
parents:
diff
changeset
|
5 class LogVersion implements Serializable { |
3dc0c5604566
Initial checkin of blitz 2.0 fcs - no installer yet.
Dan Creswell <dan.creswell@gmail.com>
parents:
diff
changeset
|
6 static final long serialVersionUID = -6949591955686028824L; |
3dc0c5604566
Initial checkin of blitz 2.0 fcs - no installer yet.
Dan Creswell <dan.creswell@gmail.com>
parents:
diff
changeset
|
7 |
3dc0c5604566
Initial checkin of blitz 2.0 fcs - no installer yet.
Dan Creswell <dan.creswell@gmail.com>
parents:
diff
changeset
|
8 static final LogVersion VERSION = new LogVersion(1, 1); |
3dc0c5604566
Initial checkin of blitz 2.0 fcs - no installer yet.
Dan Creswell <dan.creswell@gmail.com>
parents:
diff
changeset
|
9 |
3dc0c5604566
Initial checkin of blitz 2.0 fcs - no installer yet.
Dan Creswell <dan.creswell@gmail.com>
parents:
diff
changeset
|
10 private int theMajor; |
3dc0c5604566
Initial checkin of blitz 2.0 fcs - no installer yet.
Dan Creswell <dan.creswell@gmail.com>
parents:
diff
changeset
|
11 private int theMinor; |
3dc0c5604566
Initial checkin of blitz 2.0 fcs - no installer yet.
Dan Creswell <dan.creswell@gmail.com>
parents:
diff
changeset
|
12 |
3dc0c5604566
Initial checkin of blitz 2.0 fcs - no installer yet.
Dan Creswell <dan.creswell@gmail.com>
parents:
diff
changeset
|
13 private LogVersion(int aMajor, int aMinor) { |
3dc0c5604566
Initial checkin of blitz 2.0 fcs - no installer yet.
Dan Creswell <dan.creswell@gmail.com>
parents:
diff
changeset
|
14 theMajor = aMajor; |
3dc0c5604566
Initial checkin of blitz 2.0 fcs - no installer yet.
Dan Creswell <dan.creswell@gmail.com>
parents:
diff
changeset
|
15 theMinor = aMinor; |
3dc0c5604566
Initial checkin of blitz 2.0 fcs - no installer yet.
Dan Creswell <dan.creswell@gmail.com>
parents:
diff
changeset
|
16 } |
3dc0c5604566
Initial checkin of blitz 2.0 fcs - no installer yet.
Dan Creswell <dan.creswell@gmail.com>
parents:
diff
changeset
|
17 |
3dc0c5604566
Initial checkin of blitz 2.0 fcs - no installer yet.
Dan Creswell <dan.creswell@gmail.com>
parents:
diff
changeset
|
18 public boolean equals(Object anObject) { |
3dc0c5604566
Initial checkin of blitz 2.0 fcs - no installer yet.
Dan Creswell <dan.creswell@gmail.com>
parents:
diff
changeset
|
19 if (anObject instanceof LogVersion) { |
3dc0c5604566
Initial checkin of blitz 2.0 fcs - no installer yet.
Dan Creswell <dan.creswell@gmail.com>
parents:
diff
changeset
|
20 LogVersion myOther = (LogVersion) anObject; |
3dc0c5604566
Initial checkin of blitz 2.0 fcs - no installer yet.
Dan Creswell <dan.creswell@gmail.com>
parents:
diff
changeset
|
21 |
3dc0c5604566
Initial checkin of blitz 2.0 fcs - no installer yet.
Dan Creswell <dan.creswell@gmail.com>
parents:
diff
changeset
|
22 return ((myOther.theMajor == theMajor) && |
3dc0c5604566
Initial checkin of blitz 2.0 fcs - no installer yet.
Dan Creswell <dan.creswell@gmail.com>
parents:
diff
changeset
|
23 (myOther.theMinor == theMinor)); |
3dc0c5604566
Initial checkin of blitz 2.0 fcs - no installer yet.
Dan Creswell <dan.creswell@gmail.com>
parents:
diff
changeset
|
24 } |
3dc0c5604566
Initial checkin of blitz 2.0 fcs - no installer yet.
Dan Creswell <dan.creswell@gmail.com>
parents:
diff
changeset
|
25 |
3dc0c5604566
Initial checkin of blitz 2.0 fcs - no installer yet.
Dan Creswell <dan.creswell@gmail.com>
parents:
diff
changeset
|
26 return false; |
3dc0c5604566
Initial checkin of blitz 2.0 fcs - no installer yet.
Dan Creswell <dan.creswell@gmail.com>
parents:
diff
changeset
|
27 } |
3dc0c5604566
Initial checkin of blitz 2.0 fcs - no installer yet.
Dan Creswell <dan.creswell@gmail.com>
parents:
diff
changeset
|
28 |
3dc0c5604566
Initial checkin of blitz 2.0 fcs - no installer yet.
Dan Creswell <dan.creswell@gmail.com>
parents:
diff
changeset
|
29 public String toString() { |
3dc0c5604566
Initial checkin of blitz 2.0 fcs - no installer yet.
Dan Creswell <dan.creswell@gmail.com>
parents:
diff
changeset
|
30 return "LogVersion: " + theMajor + "." + theMinor; |
3dc0c5604566
Initial checkin of blitz 2.0 fcs - no installer yet.
Dan Creswell <dan.creswell@gmail.com>
parents:
diff
changeset
|
31 } |
3dc0c5604566
Initial checkin of blitz 2.0 fcs - no installer yet.
Dan Creswell <dan.creswell@gmail.com>
parents:
diff
changeset
|
32 } |