KeyType - object type of the keysValueType - object type of the valuespublic class MapBasedStorageService<KeyType,ValueType> extends Object implements StorageService<KeyType,ValueType>
Map based StorageService implementation.| 修飾子 | コンストラクタと説明 |
|---|---|
|
MapBasedStorageService()
Constructor.
|
protected |
MapBasedStorageService(Map<String,Map<KeyType,ValueType>> serviceStore)
Constructor.
|
| 修飾子とタイプ | メソッドと説明 |
|---|---|
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.
|
public Iterator<String> getPartitions()
getPartitions インタフェース内 StorageService<KeyType,ValueType>public Iterator<KeyType> getKeys(String partition)
getKeys インタフェース内 StorageService<KeyType,ValueType>partition - partition on which to operatepublic boolean contains(String partition, KeyType key)
contains インタフェース内 StorageService<KeyType,ValueType>partition - partition on which to operatekey - the key to checkpublic ValueType get(String partition, KeyType key)
get インタフェース内 StorageService<KeyType,ValueType>partition - partition on which to operatekey - the keypublic ValueType put(String partition, KeyType key, ValueType value)
put インタフェース内 StorageService<KeyType,ValueType>partition - partition on which to operatekey - the keyvalue - the valueCopyright © 2012. All Rights Reserved.