K
- V
- public interface PRDistributedMap<K extends java.io.Serializable,V extends java.io.Serializable>
extends java.util.Map<K,V>
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT |
static java.lang.String |
VERSION |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
addEntryListener(PRDistributedMapEntryListener<K,V> aListener)
Adds an entry listener for this map.
Listener will get notified for all map add/remove/update/evict events. |
java.util.Set<java.util.Map.Entry<K,V>> |
entrySet()
Returns a Set view of the mappings contained in this map.
Warn: The returned collection is not backed to the Map. So any changes to it is not reflected in the map and vice versa. |
V |
get(java.lang.Object aKey)
Gets the value associated with given key from map.
|
java.lang.String |
getCategory() |
java.lang.String |
getMapName() |
int |
getMaxObjectSize() |
java.lang.Class |
getObjectClass() |
boolean |
isLocked(K aKey)
Checks the lock for the specified key.
|
java.util.Set<K> |
keySet()
Returns a set containing all keys in the Map.
Warn: The returned set is not backed to the Map. So any changes to it is not reflected in the map and vice versa. |
void |
lock(K aKey)
Acquires lock on specified key only if it exists in the map i.e., lock cannot be acquired on non-existent key.
If the lock is held by some other thread (on same node or different node), then the current thread waits till lock is acquired. |
V |
put(K aKey,
V aValue)
Associates the given key with given value in this map.
|
void |
putAll(java.util.Map<? extends K,? extends V> aMap)
Copies all of the mappings from the specified map to this map.
|
boolean |
removeEntryListener(java.lang.String aEventSubscriptionIdentifier)
Removes the specified entry listener Returns silently if there is no such listener added before.
|
boolean |
tryLock(K aKey)
Tries to acquire the lock for the specified key.
If the lock is not available then the current thread doesn't wait and returns false immediately. |
void |
unlock(K aKey)
Releases the lock for the specified key.
|
java.util.Collection<V> |
values()
Returns a collection containing all values in the Map.
Warn: The returned collection is not backed by the Map. So any changes to it is not reflected in the map and vice versa. Any modifications to the objects are also not reflected in the map. After modifications the object should be put into map again for changes to be visible. |
static final java.lang.String COPYRIGHT
static final java.lang.String VERSION
java.lang.String getMapName()
java.lang.String getCategory()
java.lang.Class getObjectClass()
int getMaxObjectSize()
V get(java.lang.Object aKey)
V put(K aKey, V aValue)
void putAll(java.util.Map<? extends K,? extends V> aMap)
java.util.Set<K> keySet()
java.util.Collection<V> values()
java.util.Set<java.util.Map.Entry<K,V>> entrySet()
void lock(K aKey)
aKey
- boolean tryLock(K aKey)
aKey
- boolean isLocked(K aKey)
aKey
- void unlock(K aKey)
aKey
- key to lock.java.lang.IllegalMonitorStateException
- if the current thread does not hold this lockjava.lang.String addEntryListener(PRDistributedMapEntryListener<K,V> aListener)
aListener
- - a listener instanceboolean removeEntryListener(java.lang.String aEventSubscriptionIdentifier)
aEventSubscriptionIdentifier
- - a registered listenerCopyright © 2015 Pegasystems Inc. All Rights Reserved.