01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
03: */
04: package com.tc.objectserver.l1.api;
05:
06: import com.tc.net.groups.NodeID;
07: import com.tc.object.ObjectID;
08: import com.tc.objectserver.managedobject.BackReferences;
09: import com.tc.text.PrettyPrintable;
10:
11: import java.util.Collection;
12: import java.util.List;
13: import java.util.Set;
14:
15: /**
16: * @author steve
17: */
18: public interface ClientStateManager extends PrettyPrintable {
19:
20: public void stop();
21:
22: /**
23: * Initializes the internal datastructures for newly connected client
24: */
25: public void startupNode(NodeID nodeID);
26:
27: /**
28: * Clears internal data structures for disconnected clients
29: *
30: */
31: public void shutdownNode(NodeID deadNode);
32:
33: /**
34: * The the server representation of the client's state now knows that clientID has a reference to objectID
35: */
36: public void addReference(NodeID nodeID, ObjectID objectID);
37:
38: /**
39: * For the local state of the l1 named clientID remove all the objectIDs that are references
40: */
41: public void removeReferences(NodeID nodeID, Set removed);
42:
43: public boolean hasReference(NodeID nodeID, ObjectID objectID);
44:
45: /**
46: * Prunes the changes list down to include only changes for objects the given client has.
47: * @param objectIDs TODO
48: */
49: public List createPrunedChangesAndAddObjectIDTo(Collection changes,
50: BackReferences references, NodeID clientID, Set objectIDs);
51:
52: public void addAllReferencedIdsTo(Set rescueIds);
53:
54: public void removeReferencedFrom(NodeID nodeID, Set secondPass);
55:
56: public Set addReferences(NodeID nodeID, Set oids);
57:
58: }
|