org.sourceforge.jemm.client.shared
Class WeakSingletonFactory<K,V>
java.lang.Object
org.sourceforge.jemm.client.shared.WeakSingletonFactory<K,V>
- Direct Known Subclasses:
- JEMMObjectFactory, TrackedIDFactoryImpl
public abstract class WeakSingletonFactory<K,V>
- extends java.lang.Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
keysToWeakRefs
protected final EnhancedConcurrentHashMap<K,java.lang.ref.WeakReference<V>> keysToWeakRefs
refsToKeys
protected final java.util.Map<java.lang.ref.WeakReference<V>,K> refsToKeys
queue
protected final java.lang.ref.ReferenceQueue<V> queue
queueListener
protected final java.lang.Thread queueListener
WeakSingletonFactory
public WeakSingletonFactory()
put
public void put(K key,
V value)
contains
public boolean contains(K key)
size
public int size()
notifyExpired
protected abstract void notifyExpired(K k)
get
public V get(K k)
remove
public void remove(K key)
shutdown
public void shutdown()
- Stops the listener thread and releases native resources.
create
public V create(K k)
createValue
protected abstract V createValue(K k)
Copyright © 2009. All Rights Reserved.