Package com.j_spaces.kernel
Interface IOrderedList<T>
- All Superinterfaces:
ICollection<T>,IHashEntry<Object,,IStoredList<T>> IObjectsList,IStoredList<T>
- All Known Implementing Classes:
ExternallyLockedStoredList
- Since:
- 6.1
- Author:
- anna
-
Method Summary
Modifier and TypeMethodDescriptionestablishListOrderedScan(IObjectInfo<T> OrderedScanPivot, boolean ascending) establish a scan position in one direction ascending (towards head) or descending (towards tail).getLargerInOrder(IObjectInfo<T> ref) In an ordered , get the element larger than ref.getSmallerInOrder(IObjectInfo<T> ref) In an ordered , get the element smaller than ref.storeBeforeCeiling(IObjectInfo<T> ceiling, T subject) Given an ObjectInfo of an existing element, store a new element right "before" this one (towards the tail).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
isIteratorMethods inherited from interface com.j_spaces.kernel.IStoredList
addUnlocked, dump, freeSLHolder, getHead, getObjectFromHead, invalidate, optimizeScanForSingleObject, remove, removeUnlocked
-
Method Details
-
establishListOrderedScan
establish a scan position in one direction ascending (towards head) or descending (towards tail). Used by the OrderedIndex masterList to establish an index scan.- Parameters:
OrderedScanPivot- a pivot from which to start this scan. if null, pivot is Head (if ascending is true); Tail otherwiseascending- iftruescan from pivot towards head; iffalsescan from pivot towards tail.- Returns:
- returns a Holder of this scan. This Resource should be released if scan ended prematurely.
-
storeBeforeCeiling
Given an ObjectInfo of an existing element, store a new element right "before" this one (towards the tail). This Method used in OrderedIndex object when the MasterList reflects the order of elements: head is the largest, tail the smallest in value. [Tail] - .. - [beforeCeiling] - [newOi] - [ceiling] - .. - [Head]- Parameters:
ceiling- a ceiling to the new element (towards the head); when null, the ceiling will be the Head.subject- a new element, to be inserted before the ceiling (towards the tail)- Returns:
- an information node representing the inserted element.
Note: not relevant for random scans
- Throws:
RuntimeException- if ceiling was already deleted
-
getLargerInOrder
In an ordered , get the element larger than ref.- Parameters:
ref- a reference to an OI (element in the )- Returns:
- the next largest element to ref (towards head)
-
getSmallerInOrder
In an ordered , get the element smaller than ref.- Parameters:
ref- a reference to an OI (element in the )- Returns:
- the next smallest to ref (towards tail)
-