|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.avalon.framework.logger.AbstractLoggable | +--org.apache.cocoon.components.store.JispFilesystemStore
This store is based on the Jisp library (http://www.coyotegulch.com/jisp/index.html). This store uses B-Tree indexes to access variable-length serialized data stored in files.
Field Summary | |
protected java.io.File |
cacheDir
|
protected java.io.File |
directoryFile
The directory repository |
protected java.lang.String |
directoryPath
|
protected java.io.File |
workDir
|
Fields inherited from interface org.apache.cocoon.components.store.Store |
PERSISTENT_CACHE, ROLE, TRANSIENT_CACHE |
Constructor Summary | |
JispFilesystemStore()
|
Method Summary | |
boolean |
containsKey(java.lang.Object key)
Test if the the index file contains the given key |
void |
contextualize(org.apache.avalon.framework.context.Context context)
Contextualize the Component |
void |
free()
Frees some values of the data file. TODO: implementation |
java.lang.Object |
get(java.lang.Object key)
Returns a Object from the store associated with the Key Object |
java.lang.String |
getDirectoryPath()
Returns the repository's full pathname |
void |
hold(java.lang.Object key,
java.lang.Object value)
Holds the given object in the indexed data file. |
void |
initialize()
Initialize the Component |
java.util.Enumeration |
keys()
Returns a Enumeration of all Keys in the indexed file. |
void |
parameterize(org.apache.avalon.framework.parameters.Parameters params)
Configure the Component. A few options can be used datafile = the name of the data file (Default: cocoon.dat) indexfile = the name of the index file (Default: cocoon.idx) order = The page size of the B-Tree |
void |
remove(java.lang.Object key)
Removes a value from the data file with the given key. |
void |
setDirectory(java.io.File directory)
Sets the repository's location |
void |
setDirectory(java.lang.String directory)
Sets the repository's location |
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.AbstractLoggable |
getLogger, setLogger, setupLogger, setupLogger, setupLogger |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.io.File workDir
protected java.io.File cacheDir
protected java.io.File directoryFile
protected volatile java.lang.String directoryPath
Constructor Detail |
public JispFilesystemStore()
Method Detail |
public void setDirectory(java.lang.String directory) throws java.io.IOException
directory
- the new directory valuejava.io.IOException
- public void setDirectory(java.io.File directory) throws java.io.IOException
directory
- the new directory valuejava.io.IOException
- public void contextualize(org.apache.avalon.framework.context.Context context) throws org.apache.avalon.framework.context.ContextException
contextualize
in interface org.apache.avalon.framework.context.Contextualizable
context
- the Context of the Applicationorg.apache.avalon.framework.context.ContextException
- public void parameterize(org.apache.avalon.framework.parameters.Parameters params) throws org.apache.avalon.framework.parameters.ParameterException
parameterize
in interface org.apache.avalon.framework.parameters.Parameterizable
params
- the configuration paramtersorg.apache.avalon.framework.parameters.ParameterException
- public void initialize()
initialize
in interface org.apache.avalon.framework.activity.Initializable
public java.lang.String getDirectoryPath()
public java.lang.Object get(java.lang.Object key)
get
in interface Store
key
- the Key objectpublic void store(java.lang.Object key, java.lang.Object value) throws java.io.IOException
store
in interface Store
key
- the key objectvalue
- the value objectjava.io.IOException
- public void hold(java.lang.Object key, java.lang.Object value) throws java.io.IOException
hold
in interface Store
key
- the key objectvalue
- the value objectjava.io.IOException
- public void free()
free
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 objectpublic java.util.Enumeration keys()
keys
in interface Store
public int size()
Store
size
in interface Store
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |