|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
V - the type for the map's valuespublic interface BindingKeyedMap<V>
A persistent Map that uses service bindings in the data service
to store key/value mappings. Values stored in this map must implement
Serializable, and may (but are not required to) implement ManagedObject. This map does not permit null keys or values.
A value is stored in the data service using its associated key (a
String) as a suffix to the keyPrefix specified during construction
(see BindingKeyedCollections.newMap(java.lang.String)). If a value implements Serializable, but does not implement ManagedObject, the value will
be wrapped in an instance of ManagedSerializable when storing it in
the data service. Note: users of this map must use this map's APIs to
avoid leaking wrappers for non-managed, serializable objects.
The iterators of an Map.entrySet(), Map.keySet(), or Map.values() view of this map implement Serializable. None of the
iterators of this map throw ConcurrentModificationException for any
of their methods.
The iterators of an Map.entrySet() or Map.values() view of
this map throw ObjectNotFoundException during an attempt to
access (via the Iterator.next method) a ManagedObject that has been removed from the DataManager.
Note: This map is parameterized by value type only. A String
is the only valid key type for a BindingKeyedMap.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface java.util.Map |
|---|
Map.Entry<K,V> |
| Method Summary | |
|---|---|
void |
clear()
Removes all mappings from this map. |
boolean |
containsValue(Object value)
Returns true if this map maps one or more keys to the specified
value. |
V |
get(Object key)
Returns the value to which the specified key is mapped, or
null if this map contains no mapping for this key. |
String |
getKeyPrefix()
Returns the key prefix for this map. |
V |
put(String key,
V value)
Associates the specified value with the specified key in this map. |
boolean |
putOverride(String key,
V value)
Associates the specified key with the specified value,
and returns true if the key was previously mapped. |
V |
remove(Object key)
Removes the mapping for key from this map if it is present,
and returns the value to which the key was previously mapped, or
null if this map contains no mapping for this key. |
boolean |
removeOverride(String key)
Removes the specified key and associated value from the map,
and returns true if the key was previously mapped. |
int |
size()
Returns the number of key-value mappings in this map. |
| Methods inherited from interface java.util.Map |
|---|
containsKey, entrySet, equals, hashCode, isEmpty, keySet, putAll, values |
| Method Detail |
|---|
String getKeyPrefix()
V put(String key,
V value)
value with the specified key in this map. If the map previously contained a mapping for the
key, the previous value is replaced by the specified value.
put in interface Map<String,V>key - a keyvalue - a value
key, or
null if there was no such mapping
IllegalArgumentException - if value does not implement
Serializable
ObjectNotFoundException - if value is a managed
object that has been removed from the DataManager,
or the key was previously mapped to a ManagedObject
that has been removed
boolean putOverride(String key,
V value)
key with the specified value,
and returns true if the key was previously mapped. This method
will not throw ObjectNotFoundException if the key was
previously mapped to a ManagedObject that has been removed from
the DataManager.
key - a keyvalue - a value
true if the key was previously mapped, and false otherwise
IllegalArgumentException - if value does not implement
Serializable
ObjectNotFoundException - if value is a managed
object that has been removed from the DataManagerV get(Object key)
key is mapped, or
null if this map contains no mapping for this key.
get in interface Map<String,V>key - a key
key is mapped, or
null if there is no such mapping
ClassCastException - if key is not an instance of
String
ObjectNotFoundException - if the key is mapped to
a ManagedObject that has been removedV remove(Object key)
key from this map if it is present,
and returns the value to which the key was previously mapped, or
null if this map contains no mapping for this key.
remove in interface Map<String,V>key - a key
key was previously
mapped, or null if there is no such mapping
ClassCastException - if key is not an instance of
String
ObjectNotFoundException - if the key was previously mapped to
a ManagedObject that has been removedboolean removeOverride(String key)
key and associated value from the map,
and returns true if the key was previously mapped. This method
will not throw ObjectNotFoundException if the key was
previously mapped to a ManagedObject that has been removed from
the DataManager.
key - a key
true if the key was previously mapped, and false otherwiseboolean containsValue(Object value)
true if this map maps one or more keys to the specified
value. Values that have been removed from the data manager will be
ignored.
containsValue in interface Map<String,V>value - value whose presence in this map is to be tested
true if this map maps one or more keys to the specified
value
ClassCastException - if value is of an inappropriate
type for this map (optional)void clear()
clear in interface Map<String,V>int size()
size in interface Map<String,V>
|
RedDwarf, Version 0.10.1 2010-03-14 10:56:12 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||