001: /*
002: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
003: */
004: package com.tc.objectserver.core.impl;
005:
006: import com.tc.object.ObjectID;
007: import com.tc.objectserver.api.GCStats;
008: import com.tc.objectserver.api.ObjectManagerEventListener;
009: import com.tc.objectserver.core.api.Filter;
010: import com.tc.objectserver.core.api.GarbageCollector;
011: import com.tc.text.PrettyPrinter;
012: import com.tc.util.concurrent.LifeCycleState;
013: import com.tc.util.concurrent.StoppableThread;
014:
015: import java.util.Collection;
016: import java.util.Collections;
017: import java.util.Set;
018:
019: public class NullGarbageCollector implements GarbageCollector {
020:
021: public Set collect(Filter filter, Collection roots,
022: Set managedObjectIds) {
023: return Collections.EMPTY_SET;
024: }
025:
026: public Set collect(Filter filter, Collection roots,
027: Set managedObjectIds, LifeCycleState state) {
028: return Collections.EMPTY_SET;
029: }
030:
031: public boolean isPausingOrPaused() {
032: return false;
033: }
034:
035: public boolean isPaused() {
036: return false;
037: }
038:
039: public void notifyReadyToGC() {
040: return;
041: }
042:
043: public void blockUntilReadyToGC() {
044: return;
045: }
046:
047: public void requestGCPause() {
048: return;
049: }
050:
051: public void notifyGCDeleteStarted() {
052: return;
053: }
054:
055: public void notifyGCComplete() {
056: return;
057: }
058:
059: public PrettyPrinter prettyPrint(PrettyPrinter out) {
060: return out.print(getClass().getName());
061: }
062:
063: public void changed(ObjectID changedObject, ObjectID oldReference,
064: ObjectID newReference) {
065: // do nothing null
066: }
067:
068: public void gc() {
069: // do nothing null
070: }
071:
072: public void addNewReferencesTo(Set rescueIds) {
073: // do nothing null
074: }
075:
076: public void start() {
077: // do nothing null
078: }
079:
080: public void stop() {
081: // do nothing null
082: }
083:
084: public void setState(StoppableThread st) {
085: // do nothing null
086: }
087:
088: public void addListener(ObjectManagerEventListener listener) {
089: // do nothing null
090: }
091:
092: public GCStats[] getGarbageCollectorStats() {
093: return null;
094: }
095:
096: public boolean disableGC() {
097: return true;
098: }
099:
100: public void enableGC() {
101: // do nothing null
102: }
103:
104: public boolean isDisabled() {
105: return true;
106: }
107:
108: public boolean isStarted() {
109: return false;
110: }
111: }
|