KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tc > objectserver > core > api > GarbageCollector


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.core.api;
5
6 import com.tc.object.ObjectID;
7 import com.tc.objectserver.api.GCStats;
8 import com.tc.objectserver.api.ObjectManagerEventListener;
9 import com.tc.text.PrettyPrintable;
10 import com.tc.util.concurrent.LifeCycleState;
11 import com.tc.util.concurrent.StoppableThread;
12
13 import java.util.Collection JavaDoc;
14 import java.util.Set JavaDoc;
15
16 public interface GarbageCollector extends PrettyPrintable {
17
18   public boolean isPausingOrPaused();
19
20   public boolean isPaused();
21
22   /**
23    * Called by object manager. Notifies the garbage collector that it's ok to perform GC.
24    */

25   public void notifyReadyToGC();
26
27   /*
28    * Request to pause when the system state stabalizes
29    */

30   public void requestGCPause();
31
32   /**
33    * Called by the GC thread. Notifies the garbage collector that TC is complete.
34    */

35   public void notifyGCComplete();
36
37   /**
38    * @param traverser Determines whether or not to traverse a given tree node.
39    * @param roots
40    * @param managedObjects
41    * @return An set on the objects that can be deleted
42    */

43   public Set JavaDoc collect(Filter traverser, Collection JavaDoc roots, Set JavaDoc managedObjectIds);
44
45   public Set JavaDoc collect(Filter traverser, Collection JavaDoc roots, Set JavaDoc managedObjectIds, LifeCycleState state);
46
47   public void changed(ObjectID changedObject, ObjectID oldReference, ObjectID newReference);
48
49   public void gc();
50
51   public void addNewReferencesTo(Set JavaDoc rescueIds);
52
53   public void start();
54
55   public void stop();
56
57   public void setState(StoppableThread st);
58
59   public void addListener(ObjectManagerEventListener listener);
60
61   public GCStats[] getGarbageCollectorStats();
62 }
Popular Tags