|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.cocoon.components.store.FilesystemStore
FilesystemStore
public final class FilesystemStore
Stores objects on the filesystem: String objects as text files, all other objects are serialized.
| Field Summary | |
|---|---|
protected File |
cacheDir
Deprecated. |
protected File |
directoryFile
Deprecated. The directory repository |
protected String |
directoryPath
Deprecated. |
protected File |
workDir
Deprecated. |
| Fields inherited from interface org.apache.cocoon.components.store.Store |
|---|
PERSISTENT_CACHE, ROLE, TRANSIENT_CACHE |
| Constructor Summary | |
|---|---|
FilesystemStore()
Deprecated. |
|
| Method Summary | |
|---|---|
protected void |
addKeys(org.apache.cocoon.components.store.FilesystemStore.FSEnumeration fsEnum,
File directory)
Deprecated. |
boolean |
containsKey(Object key)
Deprecated. Indicates if the given key is associated to a contained object. |
void |
contextualize(Context context)
Deprecated. |
protected int |
countKeys(File directory)
Deprecated. |
protected String |
decode(String filename)
Deprecated. Inverse of encode exept it do not use path. |
String |
encode(String s)
Deprecated. Returns a String that uniquely identifies the object. |
protected File |
fileFromKey(Object key)
Deprecated. |
void |
free()
Deprecated. |
Object |
get(Object key)
Deprecated. Get the File object associated with the given unique key name. |
String |
getDirectoryPath()
Deprecated. Returns the repository's full pathname |
Object |
getObject(Object key)
Deprecated. |
String |
getString(Object key)
Deprecated. |
void |
hold(Object key,
Object value)
Deprecated. Holds the given object in a volatile state. |
Enumeration |
keys()
Deprecated. Returns the list of stored files as an Enumeration of Files |
void |
parameterize(Parameters params)
Deprecated. |
void |
remove(Object key)
Deprecated. Remove the object associated to the given key. |
void |
setDirectory(File directory)
Deprecated. Sets the repository's location |
void |
setDirectory(String directory)
Deprecated. Sets the repository's location |
int |
size()
Deprecated. Returns count of the objects in the store, or -1 if could not be obtained. |
void |
store(Object key,
Object value)
Deprecated. Store the given object in a persistent state. 1) Null values generate empty directories. 2) String values are dumped to text files 3) Object values are serialized |
| 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 File workDir
protected File cacheDir
protected File directoryFile
protected volatile String directoryPath
| Constructor Detail |
|---|
public FilesystemStore()
| Method Detail |
|---|
public void setDirectory(String directory)
throws IOException
IOException
public void contextualize(Context context)
throws ContextException
contextualize in interface ContextualizableContextException
public void parameterize(Parameters params)
throws ParameterException
parameterize in interface ParameterizableParameterException
public void setDirectory(File directory)
throws IOException
IOExceptionpublic String getDirectoryPath()
public Object get(Object key)
get in interface Store
public void store(Object key,
Object value)
throws IOException
store in interface StoreIOException
public void hold(Object key,
Object value)
throws IOException
hold in interface StoreIOExceptionpublic void remove(Object key)
remove in interface Storepublic boolean containsKey(Object key)
containsKey in interface Storepublic Enumeration keys()
keys in interface Storepublic int size()
size in interface Store
protected void addKeys(org.apache.cocoon.components.store.FilesystemStore.FSEnumeration fsEnum,
File directory)
protected int countKeys(File directory)
protected File fileFromKey(Object key)
public String getString(Object key)
throws IOException
IOExceptionpublic void free()
free in interface Store
public Object getObject(Object key)
throws IOException,
ClassNotFoundException
IOException
ClassNotFoundExceptionprotected String decode(String filename)
public String encode(String s)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||