public class ListContainerImpl extends BaseContainerImpl implements ListContainer
| Modifier and Type | Field and Description |
|---|---|
protected Marshaller |
marshaller |
closed, containerId, dataManager, indexList, indexManager, initialized, loaded, persistentIndex, root| Constructor and Description |
|---|
ListContainerImpl(ContainerId id,
IndexItem root,
IndexManager indexManager,
DataManager dataManager,
boolean persistentIndex) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(int index,
Object element) |
boolean |
add(Object o) |
boolean |
addAll(Collection c) |
boolean |
addAll(int index,
Collection c) |
void |
addFirst(Object o)
Inserts the given element at the beginning of this list.
|
void |
addLast(Object o)
Appends the given element to the end of this list.
|
void |
clear() |
boolean |
contains(Object o) |
boolean |
containsAll(Collection c) |
boolean |
doRemove(int index)
remove an objecr from the list without retrieving the old value from the
store
|
boolean |
equals(Object obj) |
Object |
get(int index) |
Object |
get(StoreEntry entry)
Retrieve an Object from the Store by its location
|
StoreEntry |
getFirst()
Get the StoreEntry for the first item of the list
|
StoreEntry |
getLast()
Get the StoreEntry for the last item of the list
|
StoreEntry |
getNext(StoreEntry entry)
Get the next StoreEntry from the list
|
StoreEntry |
getPrevious(StoreEntry entry)
Get the previous StoreEntry from the list
|
protected Object |
getValue(StoreEntry item) |
int |
hashCode() |
int |
indexOf(Object o) |
protected IndexItem |
insert(int insertPos,
Object value) |
protected IndexItem |
internalAdd(int index,
Object element) |
protected StoreEntry |
internalAddFirst(Object o) |
protected StoreEntry |
internalAddLast(Object o) |
protected StoreEntry |
internalGet(int index) |
protected IndexItem |
internalSet(int index,
Object element) |
boolean |
isEmpty() |
protected void |
itemAdded(IndexItem item,
int pos,
Object value) |
protected void |
itemRemoved(int pos) |
Iterator |
iterator() |
int |
lastIndexOf(Object o) |
ListIterator |
listIterator() |
ListIterator |
listIterator(int index) |
void |
load()
The container is created or retrieved in an unloaded state.
|
StoreEntry |
placeFirst(Object object)
insert an Object in first position int the list but get a StoreEntry of
its position
|
StoreEntry |
placeLast(Object object)
add an Object to the list but get a StoreEntry of its position
|
StoreEntry |
refresh(StoreEntry entry)
It's possible that a StoreEntry could be come stale this will return an
upto date entry for the StoreEntry position
|
protected void |
remove(IndexItem item) |
Object |
remove(int index) |
boolean |
remove(Object o) |
boolean |
remove(StoreEntry entry)
remove the Object at the StoreEntry
|
boolean |
removeAll(Collection c) |
Object |
removeFirst()
Removes and returns the first element from this list.
|
Object |
removeLast()
Removes and returns the last element from this list.
|
boolean |
retainAll(Collection c) |
Object |
set(int index,
Object element) |
void |
setMarshaller(Marshaller marshaller)
For homogenous containers can set a custom marshaller for loading values
The default uses Object serialization
|
int |
size() |
List<Object> |
subList(int fromIndex,
int toIndex) |
Object[] |
toArray() |
Object[] |
toArray(Object[] a) |
String |
toString() |
void |
unload()
unload indexes from the container
|
void |
update(StoreEntry entry,
Object object)
Advanced feature = must ensure the object written doesn't overwrite other
objects in the container
|
protected IndexItem |
writeFirst(Object value) |
protected IndexItem |
writeLast(Object value) |
checkClosed, close, delete, doClear, expressDataInterest, getContainerId, getDataManager, getId, getIndexManager, getInternalList, getList, init, isLoaded, isRoot, setList, storeIndex, updateIndexesclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetId, isLoadedprotected Marshaller marshaller
public ListContainerImpl(ContainerId id, IndexItem root, IndexManager indexManager, DataManager dataManager, boolean persistentIndex) throws IOException
IOExceptionpublic void load()
ListContainerload in interface ListContainerload in class BaseContainerImplpublic void unload()
ListContainerunload in interface ListContainerunload in class BaseContainerImplpublic void setMarshaller(Marshaller marshaller)
ListContainersetMarshaller in interface ListContainerpublic int hashCode()
public int size()
size in interface Collectionsize in interface Listsize in interface ListContainersize in class BaseContainerImplpublic void addFirst(Object o)
ListContaineraddFirst in interface ListContainero - the element to be inserted at the beginning of this list.public void addLast(Object o)
ListContaineraddLast in interface ListContainero - the element to be inserted at the end of this list.public Object removeFirst()
ListContainerremoveFirst in interface ListContainerpublic Object removeLast()
ListContainerremoveLast in interface ListContainerpublic boolean isEmpty()
isEmpty in interface CollectionisEmpty in interface Listpublic boolean contains(Object o)
contains in interface Collectioncontains in interface Listpublic Object[] toArray()
toArray in interface CollectiontoArray in interface Listpublic Object[] toArray(Object[] a)
toArray in interface CollectiontoArray in interface Listpublic boolean add(Object o)
add in interface Collectionadd in interface Listpublic boolean remove(Object o)
remove in interface Collectionremove in interface Listprotected void remove(IndexItem item)
remove in class BaseContainerImplpublic boolean containsAll(Collection c)
containsAll in interface CollectioncontainsAll in interface Listpublic boolean addAll(Collection c)
addAll in interface CollectionaddAll in interface Listpublic boolean addAll(int index, Collection c)
public boolean removeAll(Collection c)
removeAll in interface CollectionremoveAll in interface Listpublic boolean retainAll(Collection c)
retainAll in interface CollectionretainAll in interface Listpublic void clear()
clear in interface Collectionclear in interface Listclear in class BaseContainerImplprotected IndexItem internalSet(int index, Object element)
protected StoreEntry internalAddLast(Object o)
protected StoreEntry internalAddFirst(Object o)
protected IndexItem internalAdd(int index, Object element)
protected StoreEntry internalGet(int index)
public boolean doRemove(int index)
ListContainerdoRemove in interface ListContainerpublic int lastIndexOf(Object o)
lastIndexOf in interface Listpublic ListIterator listIterator()
listIterator in interface Listpublic ListIterator listIterator(int index)
listIterator in interface Listpublic StoreEntry placeLast(Object object)
placeLast in interface ListContainerobject - public StoreEntry placeFirst(Object object)
placeFirst in interface ListContainerobject - public void update(StoreEntry entry, Object object)
ListContainerupdate in interface ListContainerentry - object - ListContainer.update(org.apache.activemq.kaha.StoreEntry,
java.lang.Object)public Object get(StoreEntry entry)
get in interface ListContainerentry - public boolean remove(StoreEntry entry)
remove in interface ListContainerentry - public StoreEntry getFirst()
getFirst in interface ListContainerpublic StoreEntry getLast()
getLast in interface ListContainerpublic StoreEntry getNext(StoreEntry entry)
getNext in interface ListContainerentry - public StoreEntry getPrevious(StoreEntry entry)
getPrevious in interface ListContainerentry - public StoreEntry refresh(StoreEntry entry)
refresh in interface ListContainerentry - old entryprotected IndexItem writeFirst(Object value)
protected Object getValue(StoreEntry item)
getValue in class BaseContainerImplprotected void itemRemoved(int pos)
Copyright © 2005–2017. All rights reserved.