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.objectserver.lockmanager.api;
06:
07: import com.tc.net.groups.ClientID;
08: import com.tc.net.groups.NodeID;
09: import com.tc.net.protocol.tcm.ChannelID;
10: import com.tc.net.protocol.tcm.MessageChannel;
11: import com.tc.object.msg.BatchTransactionAcknowledgeMessage;
12: import com.tc.object.net.DSOChannelManager;
13: import com.tc.object.net.DSOChannelManagerEventListener;
14:
15: import java.util.Collection;
16: import java.util.Collections;
17: import java.util.Set;
18:
19: public class NullChannelManager implements DSOChannelManager {
20:
21: public boolean isActiveID(NodeID nodeID) {
22: return true;
23: }
24:
25: public MessageChannel getActiveChannel(NodeID id) {
26: throw new UnsupportedOperationException();
27: }
28:
29: public MessageChannel[] getActiveChannels() {
30: return new MessageChannel[] {};
31: }
32:
33: public void closeAll(Collection channelIDs) {
34: return;
35: }
36:
37: public String getChannelAddress(NodeID nid) {
38: return "";
39: }
40:
41: public BatchTransactionAcknowledgeMessage newBatchTransactionAcknowledgeMessage(
42: NodeID nid) {
43: throw new UnsupportedOperationException();
44: }
45:
46: public Set getAllActiveClientIDs() {
47: return Collections.EMPTY_SET;
48: }
49:
50: public void addEventListener(DSOChannelManagerEventListener listener) {
51: //
52: }
53:
54: public void makeChannelActive(ClientID clientID, long startIDs,
55: long endIDs, boolean persistent) {
56: //
57: }
58:
59: public Set getAllClientIDs() {
60: return Collections.EMPTY_SET;
61: }
62:
63: public void makeChannelActiveNoAck(MessageChannel channel) {
64: //
65: }
66:
67: public ClientID getClientIDFor(ChannelID channelID) {
68: return new ClientID(channelID);
69: }
70:
71: }
|