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.
|
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.
|
int |
getSize()
This method returns the size of 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) |
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) |
addActiveChangeListener, finalize, getActiveChangeListeners, getContext, getHighWaterMark, getHighWaterMarkWarningIssued, getItemExpiration, getMaxItems, getName, getParent, getPredicate, getProperty, getVisibility, inserted, isActive, isDerived, removeActiveChangeListener, removed, setHighWaterMark, setHighWaterMarkWarningIssued, setItemExpiration, setMaxItems, setVisibility, updatedclone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic 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 ActiveCollectionMBeangetSize in class ActiveCollectionprotected void doInsert(Object key, Object value)
doInsert in class ActiveCollectionkey - The optional keyvalue - The valueprotected void doUpdate(Object key, Object value)
doUpdate in class ActiveCollectionkey - The keyvalue - The valueprotected void doRemove(Object key, Object value)
doRemove in class ActiveCollectionkey - The optional keyvalue - The valueprotected ActiveCollection derive(String name, ActiveCollectionContext context, Predicate predicate, Map<String,Object> properties)
derive in class ActiveCollectionname - The derived collection namecontext - The contextpredicate - The predicateproperties - The optional propertiespublic List<Object> query(QuerySpec qs)
query in class ActiveCollectionqs - The query specprotected void cleanup()
cleanup in class ActiveCollectionpublic 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.