|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IStorageHandler
An interface for storage handlers.
Description:
The IStorageHandler interface defines a generic interface for
all StorageHandlers in the StorageManager. A IStorageHandler handles the
physical access to the storage.
Concurrency issues:
-
| Method Summary | |
|---|---|
void |
cleanup(java.lang.Long lTimestamp)
Removes expired objects from the storage. |
boolean |
containsKey(java.lang.Object oKey)
Checks if the the supplied key object exists in the physical storage. |
void |
destroy()
Clean up all used recourses. |
java.lang.Object |
get(java.lang.Object oKey)
Get a object from storage. |
java.util.Hashtable |
getAll()
Return stored objects. |
long |
getCount()
Return stored object count. |
long |
getTimestamp(java.lang.Object oKey)
Retrieve an object its timestamp from storage. |
void |
init(java.lang.Object oConfigSection,
ConfigManager oConfigManager,
SystemLogger systemLogger,
SAMAgent oSAMAgent)
Initialize the handler. |
boolean |
isMaximum(long lItemCount)
Checks if the maximum available storage items is reached. |
void |
put(java.lang.Object oKey,
java.lang.Object oValue,
java.lang.Long lTimestamp)
insert object into storage. |
void |
remove(java.lang.Object oKey)
Removes object from storage. |
void |
removeAll()
Removes all objects from storage. |
| Method Detail |
|---|
void init(java.lang.Object oConfigSection,
ConfigManager oConfigManager,
SystemLogger systemLogger,
SAMAgent oSAMAgent)
throws ASelectStorageException
oConfigSection != nulloConfigManager != nullsystemLogger != nulloSAMAgent != null
oConfigSection - The section within the configuration file in which the
parameters for the IStorageHandler can be found.oConfigManager - The configuration.systemLogger - The logger for system entries.oSAMAgent - The SAM agant to use.
ASelectStorageException - If initialisation fails.
java.lang.Object get(java.lang.Object oKey)
throws ASelectStorageException
oKey != null
oKey - The identifier of the object that needs to be stored.
ASelectStorageException - If retrieving fails.
long getTimestamp(java.lang.Object oKey)
throws ASelectStorageException
oKey != null
oKey - The identifier of the object that needs to be obtained from
the storage.
ASelectStorageException - If retrieving fails.getTimestamp(Object)
java.util.Hashtable getAll()
throws ASelectStorageException
ASelectStorageException - If retrieving fails.
long getCount()
throws ASelectStorageException
ASelectStorageException - If retrieving fails.
void put(java.lang.Object oKey,
java.lang.Object oValue,
java.lang.Long lTimestamp)
throws ASelectStorageException
oKey != nulloValue != nulllTimestamp != null
oKey - The identifier of the object that needs to be stored.oValue - The object that needs to be stored.lTimestamp - The time at which the object is stored.
ASelectStorageException - If storing fails.
void remove(java.lang.Object oKey)
throws ASelectStorageException
oKey != null
oKey - The identifier of the object that needs to be removed.
ASelectStorageException - If removal fails.
void removeAll()
throws ASelectStorageException
ASelectStorageException - if removal fails.
void cleanup(java.lang.Long lTimestamp)
throws ASelectStorageException
lTimestamp != null
lTimestamp - The expiration time.
ASelectStorageException - If cleaning fails.void destroy()
boolean isMaximum(long lItemCount)
throws ASelectStorageException
lItemCount - number of items that will be checked if it is the maximum
ASelectStorageException - if io error occurred with physical storage
boolean containsKey(java.lang.Object oKey)
throws ASelectStorageException
oKey - The unique key that will be checked for existance
ASelectStorageException - if IO error occurred with physical storage
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||