public class ActiveList extends ActiveCollection implements Iterable<Object>
ActiveCollection.ActiveCollectionAdapter
Modifier | Constructor and Description |
---|---|
|
ActiveList(ActiveCollectionSource acs)
This constructor initializes the active collection.
|
|
ActiveList(ActiveCollectionSource acs,
List<Object> list)
This constructor initializes the active list.
|
|
ActiveList(String name)
This constructor initializes the active list.
|
protected |
ActiveList(String name,
ActiveCollection parent,
ActiveCollectionContext context,
Predicate predicate,
Map<String,Object> properties)
This constructor initializes the active list as a derived
version of the supplied collection, that applies the supplied predicate.
|
protected |
ActiveList(String name,
int capacity)
This constructor initializes the active list.
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(Object e) |
boolean |
addAll(Collection<? extends Object> c) |
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 |
contains(Object o) |
boolean |
containsAll(Collection<?> c) |
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 List<Object> |
deriveContent()
This method derives the content.
|
int |
getSize()
This method returns the size of the active collection.
|
protected void |
insert(Object key,
Object value)
This method adds the supplied object to the active collection.
|
boolean |
isEmpty() |
Iterator<Object> |
iterator() |
List<Object> |
query(QuerySpec qs)
This method queries the active collection, using the supplied spec.
|
boolean |
remove(Object o) |
protected void |
remove(Object key,
Object value)
This method removes the supplied object from the active collection.
|
boolean |
removeAll(Collection<?> c) |
boolean |
retainAll(Collection<?> c) |
protected void |
setCopyOnRead(boolean b)
This method sets the copy on read flag.
|
int |
size() |
Object[] |
toArray() |
<T> T[] |
toArray(T[] a) |
protected void |
update(Object key,
Object value)
This method updates the supplied value within the active collection,
based on the supplied key.
|
addActiveChangeListener, finalize, getActiveChangeListeners, getContext, getHighWaterMark, getHighWaterMarkWarningIssued, getItemExpiration, getMaxItems, getName, getParent, getPredicate, getProperty, getVisibility, inserted, isActive, isDerived, removeActiveChangeListener, removed, setHighWaterMark, setHighWaterMarkWarningIssued, setItemExpiration, setMaxItems, setVisibility, updated
public ActiveList(String name)
name
- The namepublic ActiveList(ActiveCollectionSource acs)
acs
- The Active Collection sourcepublic ActiveList(ActiveCollectionSource acs, List<Object> list)
acs
- The Active Collection sourcelist
- The listprotected ActiveList(String name, int capacity)
name
- The namecapacity
- The initial capacity of the listprotected ActiveList(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 List<Object> deriveContent()
protected void setCopyOnRead(boolean b)
b
- Whether to 'copy on read'public int getSize()
getSize
in interface ActiveCollectionMBean
getSize
in class ActiveCollection
protected void insert(Object key, Object value)
insert
in class ActiveCollection
key
- The optional keyvalue
- The valueprotected void update(Object key, Object value)
update
in class ActiveCollection
key
- The keyvalue
- The valueprotected void remove(Object key, Object value)
remove
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 isEmpty()
public boolean contains(Object o)
public int size()
public Object[] toArray()
public <T> T[] toArray(T[] a)
public boolean add(Object e)
public boolean remove(Object o)
public boolean containsAll(Collection<?> c)
public boolean addAll(Collection<? extends Object> c)
public boolean removeAll(Collection<?> c)
public boolean retainAll(Collection<?> c)
public void clear()
Copyright © 2013-2015 JBoss by Red Hat. All Rights Reserved.