KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tc > objectserver > l1 > api > ClientStateManager


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

4 package com.tc.objectserver.l1.api;
5
6 import com.tc.net.protocol.tcm.ChannelID;
7 import com.tc.object.ObjectID;
8 import com.tc.objectserver.managedobject.BackReferences;
9 import com.tc.text.PrettyPrintable;
10
11 import java.util.Collection JavaDoc;
12 import java.util.List JavaDoc;
13 import java.util.Set JavaDoc;
14
15 /**
16  * @author steve
17  */

18 public interface ClientStateManager extends PrettyPrintable {
19
20   public void stop();
21
22   /**
23    * Used to recover from client crashes this will acknowledge any waiter waiting for a downed client
24    *
25    * @param waitee
26    */

27   public void shutdownClient(ChannelID deadClient);
28
29   /**
30    * The the server representation of the client's state now knows that clientID has a reference to objectID
31    */

32   public void addReference(ChannelID clientID, ObjectID objectID);
33
34   /**
35    * For the local state of the l1 named clientID remove all the objectIDs that are references
36    */

37   public void removeReferences(ChannelID clientID, Set JavaDoc removed);
38
39   public boolean hasReference(ChannelID clientID, ObjectID objectID);
40
41   /**
42    * Prunes the changes list down to include only changes for objects the given client has.
43    * @param objectIDs TODO
44    */

45   public List JavaDoc createPrunedChangesAndAddObjectIDTo(Collection JavaDoc changes, BackReferences references, ChannelID clientID, Set JavaDoc objectIDs);
46   
47   public void addAllReferencedIdsTo(Set JavaDoc rescueIds);
48
49   public void removeReferencedFrom(ChannelID channelID, Set JavaDoc secondPass);
50
51   public Set JavaDoc addReferences(ChannelID channelID, Set JavaDoc oids);
52 }
53
Popular Tags