Package com.j_spaces.kernel.list
Class ConcurrentSegmentedStoredList<T>
java.lang.Object
com.j_spaces.kernel.list.ConcurrentStoredList<T>
com.j_spaces.kernel.list.ConcurrentSegmentedStoredList<T>
- All Implemented Interfaces:
IHashEntry<Object,,IStoredList<T>> ICollection<T>,IStoredList<T>,IObjectsList
- Since:
- 7.1
- Version:
- 1.0
- Author:
- Yechiel Fefer
-
Constructor Summary
ConstructorsConstructorDescriptionConcurrentSegmentedStoredList(boolean supportFifoPerSegment, int inputNumOfSegments, boolean padded) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected intget the number of segments in this SLprotected StoredListChainSegment<T>getSegment(int seg) protected intprotected voidbooleanSets an indication that this StoredList is invalid.intsize()Returns the amount of elements in the StoredList.protected booleanMethods inherited from class com.j_spaces.kernel.list.ConcurrentStoredList
add, add, addUnlocked, contains, dump, establishListScan, establishListScan, freeSLHolder, getHashCode, getHead, getKey, getObjectFromHead, getValue, isEmpty, isIterator, isMultiObjectCollection, isNativeHashEntry, monitor, next, optimizeScanForSingleObject, remove, removeByObject, removeUnlocked
-
Constructor Details
-
ConcurrentSegmentedStoredList
public ConcurrentSegmentedStoredList(boolean supportFifoPerSegment, int inputNumOfSegments, boolean padded)
-
-
Method Details
-
size
public int size()Description copied from interface:ICollectionReturns the amount of elements in the StoredList.- Specified by:
sizein interfaceICollection<T>- Overrides:
sizein classConcurrentStoredList<T>- Returns:
- size of the StoredList
- See Also:
-
getNumSegments
protected int getNumSegments()get the number of segments in this SL- Overrides:
getNumSegmentsin classConcurrentStoredList<T>
-
getSegment
- Overrides:
getSegmentin classConcurrentStoredList<T>
-
incremenetAndGetSize
protected int incremenetAndGetSize()- Overrides:
incremenetAndGetSizein classConcurrentStoredList<T>
-
incrementSize
protected void incrementSize()- Overrides:
incrementSizein classConcurrentStoredList<T>
-
decrementSize
protected void decrementSize()- Overrides:
decrementSizein classConcurrentStoredList<T>
-
invalidate
public boolean invalidate()Description copied from class:ConcurrentStoredListSets 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.- Specified by:
invalidatein interfaceIStoredList<T>- Overrides:
invalidatein classConcurrentStoredList<T>- Returns:
trueif StoredList was set to invalid;falseotherwise.
-
supportsInvalidation
protected boolean supportsInvalidation()- Overrides:
supportsInvalidationin classConcurrentStoredList<T>
-