|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opensaml.util.storage.MapBasedStorageService<KeyType,ValueType>
KeyType - object type of the keysValueType - object type of the valuespublic class MapBasedStorageService<KeyType,ValueType>
A simple Map based StorageService implementation.
| Field Summary | |
|---|---|
private Map<String,Map<KeyType,ValueType>> |
store
Backing map. |
| Constructor Summary | |
|---|---|
|
MapBasedStorageService()
Constructor. |
protected |
MapBasedStorageService(Map<String,Map<KeyType,ValueType>> serviceStore)
Constructor. |
| 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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private Map<String,Map<KeyType,ValueType>> store
| Constructor Detail |
|---|
public MapBasedStorageService()
protected MapBasedStorageService(Map<String,Map<KeyType,ValueType>> serviceStore)
serviceStore - the map to use as storage| Method Detail |
|---|
public Iterator<String> getPartitions()
getPartitions in interface StorageService<KeyType,ValueType>public Iterator<KeyType> getKeys(String partition)
getKeys in interface StorageService<KeyType,ValueType>partition - partition on which to operate
public boolean contains(String partition,
KeyType key)
contains in interface StorageService<KeyType,ValueType>partition - partition on which to operatekey - the key to check
public ValueType get(String partition,
KeyType key)
get in interface StorageService<KeyType,ValueType>partition - partition on which to operatekey - the key
public ValueType put(String partition,
KeyType key,
ValueType value)
put in interface StorageService<KeyType,ValueType>partition - partition on which to operatekey - the keyvalue - the value
public ValueType remove(String partition,
KeyType key)
remove in interface StorageService<KeyType,ValueType>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 | |||||||||