Package com.j_spaces.kernel
Interface IStoredList<T>
- All Superinterfaces:
ICollection<T>,IHashEntry<Object,,IStoredList<T>> IObjectsList
- All Known Subinterfaces:
IEntryCacheInfo,IOrderedList<T>
- All Known Implementing Classes:
AbstractStoredList,BlobStoreRefEntryCacheInfo,ConcurrentSegmentedStoredList,ConcurrentSegmentedStoredListHashmapEntry,ConcurrentStoredList,EvictableEntryCacheInfo,ExternallyLockedStoredList,HashedSimpleLockIStoredList,MemoryBasedEntryCacheInfo,MVCCEntryCacheInfo,MVCCShellEntryCacheInfo,RwlSegmentedStoredList,SimpleLockStoredList,TemplateCacheInfo
public interface IStoredList<T>
extends ICollection<T>, IHashEntry<Object,IStoredList<T>>, IObjectsList
-
Method Summary
Modifier and TypeMethodDescriptionaddUnlocked(T subject) Store an element in the list, while the SL is unlocked .voidDump list content, used for Debug.voidfreeSLHolder(IStoredListIterator<T> slh) Called by an outside scan that wants to quit the scan and return the slholder to the resource pool.getHead()Returns the first element in the list (fifo)Returns the value of the first element in the list (fifo)booleanSets an indication that this StoredList is invalid.booleanreturn true if we can save iterator creation and get a single entryvoidremove(IObjectInfo<T> oi) Remove an element described by ObjectInfo.voidremoveUnlocked(IObjectInfo<T> oi) Remove an element described by ObjectInfo, while the SL is unlocked.Methods inherited from interface com.j_spaces.kernel.ICollection
add, contains, establishListScan, establishListScan, isEmpty, isMultiObjectCollection, next, removeByObject, sizeMethods inherited from interface com.gigaspaces.internal.utils.collections.economy.IHashEntry
getHashCode, getKey, getValue, isNativeHashEntryMethods inherited from interface com.j_spaces.kernel.list.IObjectsList
isIterator
-
Method Details
-
getHead
IObjectInfo<T> getHead()Returns the first element in the list (fifo)- Returns:
- the head of the list
-
getObjectFromHead
T getObjectFromHead()Returns the value of the first element in the list (fifo)- Returns:
- the value of the head of the list
-
optimizeScanForSingleObject
boolean optimizeScanForSingleObject()return true if we can save iterator creation and get a single entry- Returns:
- true if we can optimize
-
freeSLHolder
Called by an outside scan that wants to quit the scan and return the slholder to the resource pool.- Parameters:
slh- Holder resource to return to pool; can benull.
-
remove
Remove an element described by ObjectInfo. [Tail] - .. - [beforeOi] - [oi] - [afterOi] - .. - [Head]- Parameters:
oi- an existing element between Tail and Head
-
removeUnlocked
Remove an element described by ObjectInfo, while the SL is unlocked. [Tail] - .. - [beforeOi] - [oi] - [afterOi] - .. - [Head]- Parameters:
oi- an existing element between Tail and Head
-
addUnlocked
Store an element in the list, while the SL is unlocked . New elements are inserted at the tail.- Parameters:
subject- element to store.- Returns:
- an information node representing the inserted element;
nullif StoredList has been invalidated.
-
invalidate
boolean invalidate()Sets an indication that this StoredList is invalid. if isEmpty() returns true, the indication is set; otherwise the indication remains false. Called by PersistentGC when scanning for empty StoredList that can be garbage collected.- Returns:
trueif StoredList was set to invalid;falseotherwise.
-
dump
Dump list content, used for Debug.- Parameters:
logger- logger to usemsg- message to add in log
-