KeyType
- object type of the keysValueType
- object type of the valuespublic class EventingMapBasedStorageService<KeyType,ValueType> extends Object implements StorageService<KeyType,ValueType>, org.springframework.context.ApplicationContextAware
StorageService
that publishes event when items are added or removed from the
service.
An EventingMapBasedStorageService.AddEntryEvent
is published after an item has been added to the storage service. A EventingMapBasedStorageService.RemoveEntryEvent
is published after an item has been removed from the storage service. These events are published in the root
application context, that is the highest ancestor, of the application context presented to this class.修飾子とタイプ | クラスと説明 |
---|---|
static class |
EventingMapBasedStorageService.AddEntryEvent<KeyType,ValueType>
An event indicating an item has been added to an storage service.
|
class |
EventingMapBasedStorageService.PartitionEntryIterator
An iterator over the entries of a partition of the storage service.
|
class |
EventingMapBasedStorageService.PartitionIterator
An iterator over the partitions of the storage service.
|
static class |
EventingMapBasedStorageService.RemoveEntryEvent<KeyType,ValueType>
An event indicating an item has been removed from an storage service.
|
コンストラクタと説明 |
---|
EventingMapBasedStorageService()
Constructor.
|
修飾子とタイプ | メソッドと説明 |
---|---|
boolean |
contains(String partition,
Object key)
Checks if a given key exists.
|
ValueType |
get(String partition,
Object 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.
|
void |
setApplicationContext(org.springframework.context.ApplicationContext ctx) |
public boolean contains(String partition, Object key)
contains
インタフェース内 StorageService<KeyType,ValueType>
partition
- partition on which to operatekey
- the key to checkpublic ValueType get(String partition, Object key)
get
インタフェース内 StorageService<KeyType,ValueType>
partition
- partition on which to operatekey
- the keypublic Iterator<KeyType> getKeys(String partition)
getKeys
インタフェース内 StorageService<KeyType,ValueType>
partition
- partition on which to operatepublic Iterator<String> getPartitions()
getPartitions
インタフェース内 StorageService<KeyType,ValueType>
public ValueType put(String partition, KeyType key, ValueType value)
put
インタフェース内 StorageService<KeyType,ValueType>
partition
- partition on which to operatekey
- the keyvalue
- the valuepublic ValueType remove(String partition, KeyType key)
remove
インタフェース内 StorageService<KeyType,ValueType>
partition
- partition on which to operatekey
- the key to the value to removepublic void setApplicationContext(org.springframework.context.ApplicationContext ctx)
setApplicationContext
インタフェース内 org.springframework.context.ApplicationContextAware
Copyright © 2012. All Rights Reserved.