|
||||||||
| 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.FilesystemStore
Stores objects on the filesystem: String objects as text files, all other objects are serialized.
| 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 | |
FilesystemStore()
|
|
| Method Summary | |
protected void |
addKeys(org.apache.cocoon.components.store.FilesystemStore.FSEnumeration enum,
java.io.File directory)
|
boolean |
containsKey(java.lang.Object key)
Indicates if the given key is associated to a contained object. |
void |
contextualize(org.apache.avalon.framework.context.Context context)
|
protected int |
countKeys(java.io.File directory)
|
protected java.lang.String |
decode(java.lang.String filename)
Inverse of encode exept it do not use path. |
java.lang.String |
encode(java.lang.String s)
Returns a String that uniquely identifies the object. |
protected java.io.File |
fileFromKey(java.lang.Object key)
|
void |
free()
|
java.lang.Object |
get(java.lang.Object key)
Get the File object associated with the given unique key name. |
java.lang.String |
getDirectoryPath()
Returns the repository's full pathname |
java.lang.Object |
getObject(java.lang.Object key)
|
java.lang.String |
getString(java.lang.Object key)
|
void |
hold(java.lang.Object key,
java.lang.Object value)
Holds the given object in a volatile state. |
java.util.Enumeration |
keys()
Returns the list of stored files as an Enumeration of Files |
void |
parameterize(org.apache.avalon.framework.parameters.Parameters params)
|
void |
remove(java.lang.Object key)
Remove the object associated to 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 a persistent state. |
| 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 FilesystemStore()
| Method Detail |
public void setDirectory(java.lang.String directory)
throws java.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
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
public void setDirectory(java.io.File directory)
throws java.io.IOException
public java.lang.String getDirectoryPath()
public java.lang.Object get(java.lang.Object key)
get in interface Store
public void store(java.lang.Object key,
java.lang.Object value)
throws java.io.IOException
store in interface Store
public void hold(java.lang.Object key,
java.lang.Object value)
throws java.io.IOException
hold in interface Storepublic void remove(java.lang.Object key)
remove in interface Storepublic boolean containsKey(java.lang.Object key)
containsKey in interface Storepublic java.util.Enumeration keys()
keys in interface Storepublic int size()
size in interface Store
protected void addKeys(org.apache.cocoon.components.store.FilesystemStore.FSEnumeration enum,
java.io.File directory)
protected int countKeys(java.io.File directory)
protected java.io.File fileFromKey(java.lang.Object key)
public java.lang.String getString(java.lang.Object key)
throws java.io.IOException
public void free()
free in interface Store
public java.lang.Object getObject(java.lang.Object key)
throws java.io.IOException,
java.lang.ClassNotFoundException
protected java.lang.String decode(java.lang.String filename)
public java.lang.String encode(java.lang.String s)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||