|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
KeyType
- object type of the keysValueType
- object type of the valuespublic interface StorageService<KeyType,ValueType>
Generic data storage facility for use by services that require some degree of persistence. The storage service is partitioned. This is to allow different objects to use the service, each with its own partition, without the worry of conflicting keys.
Method Summary | |
---|---|
boolean |
contains(String partition,
KeyType key)
Checks if a given key exists. |
ValueType |
get(String partition,
KeyType key)
Gets the value stored under a particular key. |
Iterator<KeyType> |
getKeys(String partition)
Gets the keys for entries in the storage service. |
Iterator<String> |
getPartitions()
Gets the partitions within the service. |
ValueType |
put(String partition,
KeyType key,
ValueType value)
Adds a value, indexed by a key, in to storage. |
ValueType |
remove(String partition,
KeyType key)
Removes an item from storage. |
Method Detail |
---|
boolean contains(String partition, KeyType key)
partition
- partition on which to operatekey
- the key to check
Iterator<String> getPartitions()
Iterator<KeyType> getKeys(String partition)
partition
- partition on which to operate
ValueType get(String partition, KeyType key)
partition
- partition on which to operatekey
- the key
ValueType put(String partition, KeyType key, ValueType value)
partition
- partition on which to operatekey
- the keyvalue
- the value
ValueType remove(String partition, KeyType key)
partition
- partition on which to operatekey
- the key to the value to remove
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |