|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.avalon.framework.logger.AbstractLogEnabled org.apache.excalibur.store.impl.AbstractReadWriteStore
This is a base implementation for stores that are synchronized by using a read/write lock.
Field Summary | |
protected EDU.oswego.cs.dl.util.concurrent.ReadWriteLock |
lock
The lock |
Fields inherited from interface org.apache.excalibur.store.Store |
PERSISTENT_STORE, ROLE, TRANSIENT_STORE |
Constructor Summary | |
AbstractReadWriteStore()
|
Method Summary | |
void |
clear()
Clear the Store of all elements |
boolean |
containsKey(java.lang.Object key)
Test if the the index file contains the given key |
protected abstract void |
doClear()
Clear the Store of all data it holds |
protected abstract boolean |
doContainsKey(java.lang.Object key)
Indicates if the given key is associated to a contained object. |
protected abstract void |
doFree()
Try to free some used memory. |
protected abstract java.lang.Object |
doGet(java.lang.Object key)
Get the object associated to the given unique key. |
protected abstract java.util.Enumeration |
doGetKeys()
Returns the list of used keys as an Enumeration of Objects. |
protected abstract int |
doGetSize()
Returns count of the objects in the store, or -1 if could not be obtained. |
protected abstract void |
doRemove(java.lang.Object key)
Remove the object associated to the given key. |
protected abstract void |
doStore(java.lang.Object key,
java.lang.Object value)
Store the given object. |
void |
free()
Frees some values of the data file. |
java.lang.Object |
get(java.lang.Object key)
Returns a Object from the store associated with the Key Object |
Instrumentable[] |
getChildInstrumentables()
|
java.lang.String |
getInstrumentableName()
|
Instrument[] |
getInstruments()
|
java.util.Enumeration |
keys()
Returns a Enumeration of all Keys in the indexed file. |
void |
remove(java.lang.Object key)
Removes a value from the data file with the given key. |
void |
setInstrumentableName(java.lang.String name)
|
int |
size()
Returns count of the objects in the store, or -1 if could not be obtained. |
void |
store(java.lang.Object key,
java.lang.Object value)
Store the given object in the indexed data file. |
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected EDU.oswego.cs.dl.util.concurrent.ReadWriteLock lock
Constructor Detail |
public AbstractReadWriteStore()
Method Detail |
public java.lang.Object get(java.lang.Object key)
get
in interface Store
key
- the Key object
public void store(java.lang.Object key, java.lang.Object value) throws java.io.IOException
store
in interface Store
key
- the key objectvalue
- the value object
java.io.IOException
public void free()
free
in interface Store
public void clear()
clear
in interface Store
public void remove(java.lang.Object key)
remove
in interface Store
key
- the key objectpublic boolean containsKey(java.lang.Object key)
containsKey
in interface Store
key
- the key object
public java.util.Enumeration keys()
keys
in interface Store
public int size()
Store
size
in interface Store
public void setInstrumentableName(java.lang.String name)
public java.lang.String getInstrumentableName()
public Instrument[] getInstruments()
public Instrumentable[] getChildInstrumentables()
protected abstract java.lang.Object doGet(java.lang.Object key)
protected abstract void doStore(java.lang.Object key, java.lang.Object value) throws java.io.IOException
java.io.IOException
protected abstract void doFree()
protected abstract void doRemove(java.lang.Object key)
protected abstract void doClear()
protected abstract boolean doContainsKey(java.lang.Object key)
protected abstract java.util.Enumeration doGetKeys()
protected abstract int doGetSize()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |