public class ActiveMap extends ActiveCollection implements Iterable<Object>, Map<Object,Object>
Modifier and Type | Class and Description |
---|---|
class |
ActiveMap.Entry
This class represents an entry in the map.
|
ActiveCollection.ActiveCollectionAdapter
Modifier | Constructor and Description |
---|---|
|
ActiveMap(ActiveCollectionSource acs)
This constructor initializes the active collection.
|
|
ActiveMap(ActiveCollectionSource acs,
Map<Object,Object> map)
This constructor initializes the active map.
|
|
ActiveMap(String name)
This constructor initializes the active map.
|
protected |
ActiveMap(String name,
ActiveCollection parent,
ActiveCollectionContext context,
Predicate predicate,
Map<String,Object> properties)
This constructor initializes the active map as a derived
version of the supplied collection, that applies the supplied predicate.
|
protected |
ActiveMap(String name,
int capacity)
This constructor initializes the active list.
|
Modifier and Type | Method and Description |
---|---|
protected void |
cleanup()
This method performs any required cleanup, associated with
the active collection, related to the max items and item
expiration properties.
|
void |
clear() |
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
protected ActiveCollection |
derive(String name,
ActiveCollectionContext context,
Predicate predicate,
Map<String,Object> properties)
This method derives a child active collection from this parent collection,
with the specified name, and filtered using the supplied predicate.
|
protected Map<Object,Object> |
deriveContent()
This method derives the content.
|
protected void |
doInsert(Object key,
Object value)
This method adds the supplied object to the active collection.
|
protected void |
doRemove(Object key,
Object value)
This method removes the supplied object from the active collection.
|
protected void |
doUpdate(Object key,
Object value)
This method updates the supplied value within the active collection,
based on the supplied key.
|
Set<Map.Entry<Object,Object>> |
entrySet() |
Object |
get(Object key)
This method returns the value associated with the supplied
key.
|
protected Map<Object,Object> |
getMap()
This method returns the map.
|
int |
getSize()
This method returns the size of the active collection.
|
boolean |
isEmpty() |
Iterator<Object> |
iterator() |
Set<Object> |
keySet() |
Object |
put(Object key,
Object value) |
void |
putAll(Map<? extends Object,? extends Object> m) |
List<Object> |
query(QuerySpec qs)
This method queries the active collection, using the supplied spec.
|
Object |
remove(Object key) |
int |
size() |
Collection<Object> |
values() |
addActiveChangeListener, finalize, getActiveChangeListeners, getContext, getHighWaterMark, getHighWaterMarkWarningIssued, getItemExpiration, getMaxItems, getName, getParent, getPredicate, getProperty, getVisibility, inserted, isActive, isDerived, removeActiveChangeListener, removed, setHighWaterMark, setHighWaterMarkWarningIssued, setItemExpiration, setMaxItems, setVisibility, updated
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
public ActiveMap(String name)
name
- The namepublic ActiveMap(ActiveCollectionSource acs)
acs
- The Active Collection sourcepublic ActiveMap(ActiveCollectionSource acs, Map<Object,Object> map)
acs
- The Active Collection sourcemap
- The mapprotected ActiveMap(String name, int capacity)
name
- The namecapacity
- The initial capacity of the listprotected ActiveMap(String name, ActiveCollection parent, ActiveCollectionContext context, Predicate predicate, Map<String,Object> properties)
name
- The nameparent
- The parent collectioncontext
- The contextpredicate
- The predicateproperties
- The optional propertiesprotected Map<Object,Object> deriveContent()
public int getSize()
getSize
in interface ActiveCollectionMBean
getSize
in class ActiveCollection
protected void doInsert(Object key, Object value)
doInsert
in class ActiveCollection
key
- The optional keyvalue
- The valueprotected void doUpdate(Object key, Object value)
doUpdate
in class ActiveCollection
key
- The keyvalue
- The valueprotected void doRemove(Object key, Object value)
doRemove
in class ActiveCollection
key
- The optional keyvalue
- The valueprotected ActiveCollection derive(String name, ActiveCollectionContext context, Predicate predicate, Map<String,Object> properties)
derive
in class ActiveCollection
name
- The derived collection namecontext
- The contextpredicate
- The predicateproperties
- The optional propertiespublic List<Object> query(QuerySpec qs)
query
in class ActiveCollection
qs
- The query specprotected void cleanup()
cleanup
in class ActiveCollection
public boolean containsKey(Object key)
containsKey
in interface Map<Object,Object>
public boolean containsValue(Object value)
containsValue
in interface Map<Object,Object>
Copyright © 2013-2015 JBoss by Red Hat. All Rights Reserved.