public abstract class AbstractStoredList<T> extends Object implements IStoredList<T>, Iterable<T>
Modifier and Type | Field and Description |
---|---|
protected ArrayList<ArrayList<com.j_spaces.kernel.AbstractStoredList.ObjectInfo<T>>> |
m_AllOccupiedPos |
protected ArrayList<com.j_spaces.kernel.AbstractStoredList.ObjectInfo<T>> |
m_BasicOccupied |
protected com.j_spaces.kernel.AbstractStoredList.ObjectInfo<T> |
m_Head |
protected int |
m_LastChunk |
protected int |
m_LastPos |
protected int |
m_Size |
protected boolean |
m_Support_Random_Scans |
protected com.j_spaces.kernel.AbstractStoredList.ObjectInfo<T> |
m_Tail |
protected static int |
MINIMAL_NUMBER_TO_HANDLE_POSITIONS |
protected static int |
NUMBER_OF_OCCUPIED_POS_QUOTA |
protected static int |
SCAN_LIMIT |
Modifier | Constructor and Description |
---|---|
protected |
AbstractStoredList(boolean Support_Random_Scans) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
contains_impl(T obj) |
void |
dump(org.slf4j.Logger logger,
String msg)
Dump list content, used for Debug.
|
StoredListIterator<T> |
establishListScan(boolean random_scan)
establish a scan position.
|
StoredListIterator<T> |
establishListScan(boolean random_scan,
boolean alternatingThread)
establish a scan position.
|
void |
freeSLHolder(IStoredListIterator<T> slh)
this method is called by outside scan that want to quit the scan and return the slholder to
the factory
|
protected abstract boolean |
isInvalid() |
boolean |
isIterator()
is the list an iterator or basic list ?
|
boolean |
isMultiObjectCollection()
is it an actual multi object container.
|
protected abstract boolean |
iterate(boolean random_scan,
StoredListIterator<T> slh) |
Iterator<T> |
iterator() |
Iterator<T> |
iterator(boolean randomScan) |
IStoredListIterator<T> |
next(IStoredListIterator<T> slh)
get the next element in scan order
|
abstract boolean |
nextPos(StoredListIterator<T> slh) |
protected void |
remove_impl(com.j_spaces.kernel.AbstractStoredList.ObjectInfo<T> oiToRemove)
remove an element described by ObjectInfo
|
protected boolean |
removeByObject_impl(Object obj) |
protected com.j_spaces.kernel.AbstractStoredList.ObjectInfo<T> |
store_impl(T subject)
store an element
|
protected com.j_spaces.kernel.AbstractStoredList.ObjectInfo<T> |
storeBeforeCeiling_impl(com.j_spaces.kernel.AbstractStoredList.ObjectInfo<T> theCeiling,
T subject) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addUnlocked, getHead, getObjectFromHead, invalidate, optimizeScanForSingleObject, remove, removeUnlocked
add, contains, isEmpty, removeByObject, size
getHashCode, getKey, getValue, isNativeHashEntry
forEach, spliterator
protected static final int SCAN_LIMIT
protected static final int NUMBER_OF_OCCUPIED_POS_QUOTA
protected static final int MINIMAL_NUMBER_TO_HANDLE_POSITIONS
protected ArrayList<com.j_spaces.kernel.AbstractStoredList.ObjectInfo<T>> m_BasicOccupied
protected ArrayList<ArrayList<com.j_spaces.kernel.AbstractStoredList.ObjectInfo<T>>> m_AllOccupiedPos
protected int m_Size
protected boolean m_Support_Random_Scans
protected int m_LastChunk
protected int m_LastPos
protected com.j_spaces.kernel.AbstractStoredList.ObjectInfo<T> m_Tail
protected com.j_spaces.kernel.AbstractStoredList.ObjectInfo<T> m_Head
public void dump(org.slf4j.Logger logger, String msg)
IStoredList
dump
in interface IStoredList<T>
logger
- logger to usemsg
- message to add in logpublic StoredListIterator<T> establishListScan(boolean random_scan)
establishListScan
in interface ICollection<T>
random_scan
- true
enable random scan; false
start from head.public StoredListIterator<T> establishListScan(boolean random_scan, boolean alternatingThread)
ICollection
establishListScan
in interface ICollection<T>
random_scan
- true
enable random scan; false
start from head.alternatingThread
- true
the result iter many be used by a not-same threadprotected abstract boolean iterate(boolean random_scan, StoredListIterator<T> slh)
random_scan
- slh
- public IStoredListIterator<T> next(IStoredListIterator<T> slh)
next
in interface ICollection<T>
slh
- Holder representing a pivot position.null
if reached end of scan.public abstract boolean nextPos(StoredListIterator<T> slh)
slh
- public void freeSLHolder(IStoredListIterator<T> slh)
freeSLHolder
in interface IStoredList<T>
slh
- Holder resource to return to pool; can be null
.protected boolean removeByObject_impl(Object obj)
protected boolean contains_impl(T obj)
protected void remove_impl(com.j_spaces.kernel.AbstractStoredList.ObjectInfo<T> oiToRemove)
protected abstract boolean isInvalid()
protected com.j_spaces.kernel.AbstractStoredList.ObjectInfo<T> store_impl(T subject)
protected com.j_spaces.kernel.AbstractStoredList.ObjectInfo<T> storeBeforeCeiling_impl(com.j_spaces.kernel.AbstractStoredList.ObjectInfo<T> theCeiling, T subject)
public boolean isMultiObjectCollection()
ICollection
isMultiObjectCollection
in interface ICollection<T>
true
if its an actual list; false
otherwisepublic boolean isIterator()
IObjectsList
isIterator
in interface IObjectsList
Copyright © GigaSpaces.