01: /*
02: * All content copyright (c) 2003-2007 Terracotta, Inc., except as may otherwise be noted in a separate copyright
03: * notice. All rights reserved.
04: */
05: package com.tc.net.groups;
06:
07: import com.tc.async.api.Sink;
08:
09: public interface GroupManager {
10:
11: public NodeID join(final Node this Node, final Node[] allNodes)
12: throws GroupException;
13:
14: public NodeID getLocalNodeID() throws GroupException;
15:
16: public void sendAll(GroupMessage msg) throws GroupException;
17:
18: public GroupResponse sendAllAndWaitForResponse(GroupMessage msg)
19: throws GroupException;
20:
21: public void sendTo(NodeID node, GroupMessage msg)
22: throws GroupException;
23:
24: public GroupMessage sendToAndWaitForResponse(NodeID nodeID,
25: GroupMessage msg) throws GroupException;
26:
27: public void registerForMessages(Class msgClass,
28: GroupMessageListener listener);
29:
30: public void routeMessages(Class msgClass, Sink sink);
31:
32: public void registerForGroupEvents(GroupEventsListener listener);
33:
34: public void zapNode(NodeID nodeID, int type, String reason);
35:
36: public void setZapNodeRequestProcessor(
37: ZapNodeRequestProcessor processor);
38:
39: }
|