|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.iges.anagram.AbstractModule | +--org.iges.anagram.Store
Provides a convenient access mechanism for temporary disk storage. Each module receives a separate namespace for its entries, thus minimizing the possibility of namespace conflicts.
Field Summary | |
protected java.io.File |
baseDir
|
Fields inherited from class org.iges.anagram.AbstractModule |
log, moduleName, parent, server |
Constructor Summary | |
Store()
|
Method Summary | |
void |
configure(Setting setting)
Configures the module according to the settings provided. |
java.io.File |
get(Module module,
java.lang.String entryName)
Returns the file handle associated with the given entry name, for the given module. |
java.io.File |
get(Module module,
java.lang.String entryName,
long staleTime)
Returns the file handle associated with the given entry name, for the given module. |
java.io.File |
get(Module module,
java.lang.String prefix,
java.lang.String suffix)
Returns a unique (to this JVM session) file handle whose name is constructed using the given prefix and suffix, for the given module. |
java.lang.String |
getModuleID()
Returns an ID for this module. |
protected void |
mkdirs(java.io.File entryDir)
|
protected java.io.File |
resolve(Module module,
java.lang.String entryName)
|
Methods inherited from class org.iges.anagram.AbstractModule |
configModule, debug, debug, error, fail, fail, fail, getModuleName, info, init, toString, verbose, verbose |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected java.io.File baseDir
Constructor Detail |
public Store()
Method Detail |
public java.lang.String getModuleID()
Module
getModuleID
in interface Module
getModuleID
in class AbstractModule
public void configure(Setting setting) throws ConfigException
AbstractModule
configure
in interface Module
configure
in class AbstractModule
ConfigException
public java.io.File get(Module module, java.lang.String entryName, long staleTime)
Used in combination with the DataHandle.getCreateTime() method, this provides a way for modules to keep cached data associated with a particular data handle up to date.
It is guaranteed that all parent directories exist for the handle before it is returned.
entryName
- This parameter should uniquely identify the
resource being stored or accessed, and should not contain
any characters that are illegal in filenames.public java.io.File get(Module module, java.lang.String entryName)
It is guaranteed that all parent directories exist for the handle before it is returned.
public java.io.File get(Module module, java.lang.String prefix, java.lang.String suffix) throws ModuleException
It is guaranteed that all parent directories exist for the handle before it is returned.
ModuleException
protected void mkdirs(java.io.File entryDir)
protected java.io.File resolve(Module module, java.lang.String entryName)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |