org.ozoneDB.core.storage
Class GcListeningDelayCache
java.lang.Object
org.ozoneDB.core.storage.AbstractTrimmingCache
org.ozoneDB.core.storage.DelayCache
org.ozoneDB.core.storage.GcListeningDelayCache
- All Implemented Interfaces:
- Cache, PropertyConfigurable, TrimmingCache
- public class GcListeningDelayCache
- extends DelayCache
- Version:
- $Id: GcListeningDelayCache.java,v 1.3.2.1 2004/03/28 16:40:04 per_nyfelt Exp $
- Author:
- Leo Mekenkamp (mind the anti sp@m)
Methods inherited from class org.ozoneDB.core.storage.DelayCache |
copyToMap, get, getDelay, getEntries, getKeysToEntries, getMinSleepTime, getPropertyInfos, put, remove, setDelay, setMinSleepTime, size |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
private static java.util.logging.Logger log
HIGHTHRESHOLD
public static final PropertyInfo HIGHTHRESHOLD
LOWTHRESHOLD
public static final PropertyInfo LOWTHRESHOLD
gcIndicator
private java.lang.ref.WeakReference gcIndicator
- gets cleared every time the jvm gc runs
gcQueue
private java.lang.ref.ReferenceQueue gcQueue
gcIndicatorThread
private java.lang.Thread gcIndicatorThread
lowThreshold
private long lowThreshold
highThreshold
private long highThreshold
GcListeningDelayCache
public GcListeningDelayCache(java.util.Properties properties,
java.lang.String prefix)
resetGcIndicator
private final void resetGcIndicator()
- Creates an object that is only weakly referenced. There is a 1 on 1
correspondance between this weak reference getting enqueued and a
jvm gc run
ourGC
private void ourGC()
setHighThreshold
public void setHighThreshold(long highThreshold)
- value in range
setLowThreshold
public void setLowThreshold(long lowThreshold)
- value in range <0, min(1,highThreshold)] indicating when cache should
throw away all its entries.
getHighThreshold
public long getHighThreshold()
getLowThreshold
public long getLowThreshold()
main
public static void main(java.lang.String[] args)
Copyright (C) The Ozone Database Project - www.ozone-db.org. All rights reserved.