|
ozone core API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ozoneDB.core.storage.AbstractReferenceCache
Nested Class Summary | |
protected static interface |
AbstractReferenceCache.KeyedReference
We need to find objects in the map that holds the references. |
private class |
AbstractReferenceCache.ReferenceHandler
Handles the garbage collector 'messages' that certain softly reachable objects have been gc-ed. |
Field Summary | |
private java.util.Map |
map
backing map (key -> (ObjectReference -> cached object)) |
private java.lang.String |
prefix
|
private AbstractReferenceCache.ReferenceHandler |
referenceHandler
|
private java.lang.ref.ReferenceQueue |
referenceQueue
|
Constructor Summary | |
protected |
AbstractReferenceCache()
|
|
AbstractReferenceCache(java.util.Properties properties,
java.lang.String prefix)
|
Method Summary | |
java.util.Map |
copyToMap()
|
protected abstract AbstractReferenceCache.KeyedReference |
createKeyedReference(java.lang.Object key,
java.lang.Object value,
java.lang.ref.ReferenceQueue referenceQueue)
|
java.lang.Object |
get(java.lang.Object key)
Returns the object in this cache for the given key. |
private java.util.Map |
getMap()
|
java.lang.String |
getPrefix()
|
java.util.Collection |
getPropertyInfos()
Returns a Collection with all the properties this instance
supports. |
private java.lang.ref.ReferenceQueue |
getReferenceQueue()
|
void |
put(java.lang.Object key,
java.lang.Object value)
Puts an object into the cache, along with its identifying key. |
java.lang.Object |
remove(java.lang.Object key)
Returns the object in this cache for the given key and removes it from the cache. |
int |
size()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private java.lang.ref.ReferenceQueue referenceQueue
private AbstractReferenceCache.ReferenceHandler referenceHandler
private java.lang.String prefix
private java.util.Map map
Constructor Detail |
public AbstractReferenceCache(java.util.Properties properties, java.lang.String prefix)
protected AbstractReferenceCache()
Method Detail |
protected abstract AbstractReferenceCache.KeyedReference createKeyedReference(java.lang.Object key, java.lang.Object value, java.lang.ref.ReferenceQueue referenceQueue)
public java.lang.Object get(java.lang.Object key)
Cache
get
in interface Cache
public void put(java.lang.Object key, java.lang.Object value)
Cache
put
in interface Cache
public java.lang.Object remove(java.lang.Object key)
Cache
remove
in interface Cache
public java.util.Map copyToMap()
copyToMap
in interface Cache
private java.util.Map getMap()
private java.lang.ref.ReferenceQueue getReferenceQueue()
public int size()
size
in interface Cache
public java.lang.String getPrefix()
getPrefix
in interface PropertyConfigurable
public java.util.Collection getPropertyInfos()
PropertyConfigurable
Returns a Collection
with all the properties this instance
supports.
getPropertyInfos
in interface PropertyConfigurable
PropertyInfo
elements
|
ozone core API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |