|
Enhydra 5.1 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.lutris.util.FilePersistentStore
File system implementation of PersistentStore.
Constructor Summary | |
FilePersistentStore()
Public constructor. |
|
FilePersistentStore(java.lang.ClassLoader loader)
Public constructor. |
|
FilePersistentStore(java.lang.String storeDirectory)
Public constructor that allows one to specify the directory (repository) where objects are stored/retrieved. |
|
FilePersistentStore(java.lang.String storeDirectory,
java.lang.ClassLoader loader)
Public constructor that allows one to specify the directory (repository) where objects are stored/retrieved. |
Method Summary | |
void |
delete(java.lang.String key)
Method to delete a a key. |
boolean |
exists(java.lang.String key)
Method to query if an an object is stored. |
java.lang.String |
getStoreDirectory()
Returns the location where objects are stored/retrieved. |
java.util.Enumeration |
keys()
Method that returns an enumration of the keys of this persistent store. |
java.lang.Object |
remove(java.lang.String key)
Method to simultaneously retrieve and remove an object from persistent store. |
java.lang.Object |
retrieve(java.lang.String key)
Method to retrieve a stored object. |
void |
store(java.lang.String key,
java.io.Serializable obj)
Method to store and object (persistent). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public FilePersistentStore() throws PersistentStoreException
storeDirectory
,
the directory (repository) where objects
are stored/retreived to /tmp
.
java.io.IOException
- If /tmp
already exists but is not a directory. Or if
/tmp
does not exist and could
not be created.
java.lang.SecurityException
- If a security
manager is running but /tmp
could not be created due to inappropriate
permissions.
PersistentStoreException
public FilePersistentStore(java.lang.ClassLoader loader) throws java.io.IOException, java.lang.SecurityException, PersistentStoreException
storeDirectory
,
the directory (repository) where objects
are stored/retreived to /tmp
.
loader
- the class loader to use when reading
in serialized data.
java.io.IOException
- If /tmp
already exists but is not a directory. Or if
/tmp
does not exist and could
not be created.
java.lang.SecurityException
- If a security
manager is running but /tmp
could not be created due to inappropriate
permissions.
PersistentStoreException
public FilePersistentStore(java.lang.String storeDirectory) throws PersistentStoreException
storeDirectory
- The repository (directory) for storing and retrieving objects.
java.io.IOException
- If storeDirectory
already exists but is not a directory. Or if the
storeDirectory
does not exist and could
not be created.
java.lang.SecurityException
- If a security
manager is running but storeDirectory
could not be created due to inappropriate
permissions.
PersistentStoreException
public FilePersistentStore(java.lang.String storeDirectory, java.lang.ClassLoader loader) throws PersistentStoreException
storeDirectory
- The repository (directory) for storing and retrieving objects.
java.io.IOException
- If storeDirectory
already exists but is not a directory. Or if the
storeDirectory
does not exist and could
not be created.
java.lang.SecurityException
- If a security
manager is running but storeDirectory
could not be created due to inappropriate
permissions.
PersistentStoreException
Method Detail |
public java.lang.String getStoreDirectory()
public void store(java.lang.String key, java.io.Serializable obj) throws PersistentStoreException
store
in interface PersistentStore
key
- The key by which to identify the stored object.
The key name has some system constraints. Its length
must not exceed half the maximum file name length on
the system. If it does, an exception is thrown.obj
- The serializable object to store.
PersistentStoreException
- if the object cannot cannot be stored.
PersistentStoreException
- if an error occurs.public java.lang.Object retrieve(java.lang.String key) throws PersistentStoreException
retrieve
in interface PersistentStore
key
- The key of the object that is to be retreived.
null
is returned.
PersistentStoreException
- if the object could not be retrieved.
PersistentStoreException
- if an error occurs.remove(java.lang.String)
public boolean exists(java.lang.String key) throws PersistentStoreException
exists
in interface PersistentStore
key
- The key by which to identify the stored object.
PersistentStoreException
- If The exsitence of object could not be determined.
PersistentStoreException
- if an error occurs.public java.lang.Object remove(java.lang.String key) throws PersistentStoreException
remove
in interface PersistentStore
key
- The key by which to identify the stored object
that is to be removed.
PersistentStoreException
- If the object could not be retrieved before being deleted.
PersistentStoreException
- if an error occurs.public void delete(java.lang.String key)
delete
in interface PersistentStore
key
- The key to remove.public java.util.Enumeration keys() throws PersistentStoreException
keys
in interface PersistentStore
PersistentStoreException
- if the enumeration could not be determined.
|
Enhydra 5.1 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |