KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tc > objectserver > tx > NullTransactionAccount


1 /*
2  * All content copyright (c) 2003-2007 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
3  */

4 package com.tc.objectserver.tx;
5
6 import com.tc.net.protocol.tcm.ChannelID;
7 import com.tc.object.tx.TransactionID;
8
9 import java.util.Collections JavaDoc;
10 import java.util.Set JavaDoc;
11
12 public class NullTransactionAccount implements TransactionAccount {
13
14   private final ChannelID clientID;
15
16   public NullTransactionAccount(ChannelID clientID) {
17     this.clientID = clientID;
18   }
19
20   public void addWaitee(ChannelID waitee, TransactionID requestID) {
21     //NOP
22
}
23
24   public boolean applyCommitted(TransactionID requestID) {
25     return false;
26   }
27
28   public void applyStarted(TransactionID requestID) {
29     //NOP
30
}
31
32   public boolean broadcastCompleted(TransactionID requestID) {
33     return false;
34   }
35
36   public ChannelID getClientID() {
37     return clientID;
38   }
39
40   public boolean hasWaitees(TransactionID requestID) {
41     return false;
42   }
43
44   public boolean removeWaitee(ChannelID waitee, TransactionID requestID) {
45     return false;
46   }
47
48   public Set JavaDoc requestersWaitingFor(ChannelID waitee) {
49     return Collections.EMPTY_SET;
50   }
51
52   public boolean skipApplyAndCommit(TransactionID requestID) {
53     return false;
54   }
55
56   public boolean relayTransactionComplete(TransactionID requestID) {
57     return false;
58   }
59 }
60
Popular Tags