KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tc > objectserver > core > impl > NullGarbageCollector


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.impl;
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.objectserver.core.api.Filter;
10 import com.tc.objectserver.core.api.GarbageCollector;
11 import com.tc.text.PrettyPrinter;
12 import com.tc.util.concurrent.LifeCycleState;
13 import com.tc.util.concurrent.StoppableThread;
14
15 import java.util.Collection JavaDoc;
16 import java.util.Collections JavaDoc;
17 import java.util.Set JavaDoc;
18
19 public class NullGarbageCollector implements GarbageCollector {
20
21   public Set JavaDoc collect(Filter filter, Collection JavaDoc roots, Set JavaDoc managedObjectIds) {
22     return Collections.EMPTY_SET;
23   }
24
25   public Set JavaDoc collect(Filter filter, Collection JavaDoc roots, Set JavaDoc managedObjectIds, LifeCycleState state) {
26     return Collections.EMPTY_SET;
27   }
28
29   public boolean isPausingOrPaused() {
30     return false;
31   }
32
33   public boolean isPaused() {
34     return false;
35   }
36
37   public void notifyReadyToGC() {
38     return;
39   }
40
41   public void blockUntilReadyToGC() {
42     return;
43   }
44
45   public void requestGCPause() {
46     return;
47   }
48
49   public void notifyGCComplete() {
50     return;
51   }
52
53   public PrettyPrinter prettyPrint(PrettyPrinter out) {
54     return out.print(getClass().getName());
55   }
56
57   public void changed(ObjectID changedObject, ObjectID oldReference, ObjectID newReference) {
58     // do nothing null
59
}
60
61   public void gc() {
62     // do nothing null
63
}
64
65   public void addNewReferencesTo(Set JavaDoc rescueIds) {
66     // do nothing null
67
}
68
69   public void start() {
70     // do nothing null
71
}
72
73   public void stop() {
74     // do nothing null
75
}
76
77   public void setState(StoppableThread st) {
78     // do nothing null
79
}
80
81   public void addListener(ObjectManagerEventListener listener) {
82     // do nothing null
83
}
84
85   public GCStats[] getGarbageCollectorStats() {
86     return null;
87   }
88
89 }
Popular Tags