Mercurial > hg > blitz_condensed
comparison src/org/dancres/blitz/entry/CountAction.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.entry; | |
2 | |
3 import java.io.IOException; | |
4 | |
5 import org.dancres.blitz.txn.TxnOp; | |
6 import org.dancres.blitz.txn.TxnState; | |
7 | |
8 /** | |
9 If logging of instance counts is enabled we will emit one of these to | |
10 the log file as part of the first destructive operation we perform post | |
11 reloading/initialization of the relevant <code>EntryRepository</code>. | |
12 */ | |
13 class CountAction implements TxnOp { | |
14 private int theInstanceCount; | |
15 private String theType; | |
16 | |
17 CountAction(String aType, int aCount) { | |
18 theInstanceCount = aCount; | |
19 theType = aType; | |
20 } | |
21 | |
22 public void restore(TxnState aState) throws IOException { | |
23 // Informational - nothing to do | |
24 } | |
25 | |
26 public void commit(TxnState aState) throws IOException { | |
27 // Informational - nothing to do | |
28 } | |
29 | |
30 public void abort(TxnState aState) throws IOException { | |
31 // Informational - nothing to do | |
32 } | |
33 | |
34 public String toString() { | |
35 return " IC : " + theType + " : " + theInstanceCount; | |
36 } | |
37 } |