EAF 7.4 API

com.lutris.util
Interface PersistentStore


public interface PersistentStore

Persitent storage interface.

Author:
Kyle Clark

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.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).
 

Method Detail

store

void store(java.lang.String key,
           java.io.Serializable obj)
           throws PersistentStoreException
Method to store and object (persistent).

Parameters:
key - The key by which to identify the stored object.
obj - The serializable object to store.
Throws:
PersistentStoreException - if an error occurs.

retrieve

java.lang.Object retrieve(java.lang.String key)
                          throws PersistentStoreException
Method to retrieve a stored object.

Parameters:
key - The key of the user whose session is to be retreived.
Returns:
The stored object. If an object is not stored under key, then null is returned.
Throws:
PersistentStoreException - if an error occurs.
See Also:
remove(java.lang.String)

remove

java.lang.Object remove(java.lang.String key)
                        throws PersistentStoreException
Method to simultaneously retrieve and remove an object from persistent store. If an object is not stored under key, then null is returned.

Parameters:
key - The key by which to identify the stored object that is to be removed.
Returns:
The object that has been removed.
Throws:
PersistentStoreException - if an error occurs.

delete

void delete(java.lang.String key)
            throws PersistentStoreException
Method to delete a a key. Any objects stored under key are also removed. If key is not defined, then this method does nothing.

Parameters:
key - The key to remove.
Throws:
PersistentStoreException - if an error occurs.

exists

boolean exists(java.lang.String key)
               throws PersistentStoreException
Method to query if an an object is stored.

Parameters:
key - The key by which to identify the stored object.
Throws:
PersistentStoreException - if an error occurs.

keys

java.util.Enumeration keys()
                           throws PersistentStoreException
Method that returns an enumration of the keys of this persistent store.

Throws:
PersistentStoreException - if the enumeration could not be determined.

EAF 7.4 API