Package com.j_spaces.kernel
Class HashedSimpleLockIStoredList<T>
java.lang.Object
com.j_spaces.kernel.AbstractStoredList<T>
com.j_spaces.kernel.SimpleLockStoredList<T>
com.j_spaces.kernel.HashedSimpleLockIStoredList<T>
- All Implemented Interfaces:
IHashEntry<Object,,IStoredList<T>> ICollection<T>,IStoredList<T>,IObjectsList,Iterable<T>
hash-backed Read/Write Lock version of StoredList to be used with JDK 1.5+
-
Field Summary
Fields inherited from class com.j_spaces.kernel.SimpleLockStoredList
lockFields inherited from class com.j_spaces.kernel.AbstractStoredList
m_AllOccupiedPos, m_BasicOccupied, m_Head, m_LastChunk, m_LastPos, m_Size, m_Support_Random_Scans, m_Tail, MINIMAL_NUMBER_TO_HANDLE_POSITIONS, NUMBER_OF_OCCUPIED_POS_QUOTA, SCAN_LIMIT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstore an elementbooleanis this object contained in the SL ?voidremove(IObjectInfo<T> oi) remove an element described by ObjectInfobooleanremoveByObject(T obj) given an object scan the list, find it and remove it, returns true if foundMethods inherited from class com.j_spaces.kernel.SimpleLockStoredList
addUnlocked, getHashCode, getHead, getKey, getObjectFromHead, getValue, invalidate, isEmpty, isInvalid, isNativeHashEntry, iterate, nextPos, optimizeScanForSingleObject, removeUnlocked, sizeMethods inherited from class com.j_spaces.kernel.AbstractStoredList
contains_impl, dump, establishListScan, establishListScan, freeSLHolder, isIterator, isMultiObjectCollection, iterator, iterator, next, remove_impl, removeByObject_impl, store_impl, storeBeforeCeiling_implMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
HashedSimpleLockIStoredList
public HashedSimpleLockIStoredList(boolean Support_Random_Scans)
-
-
Method Details
-
add
store an element- Specified by:
addin interfaceICollection<T>- Overrides:
addin classSimpleLockStoredList<T>- Parameters:
subject- element to store.- Returns:
- an information node representing the inserted element;
nullif StoredList has been invalidated.
-
remove
remove an element described by ObjectInfo- Specified by:
removein interfaceIStoredList<T>- Overrides:
removein classSimpleLockStoredList<T>- Parameters:
oi- an existing element between Tail and Head
-
removeByObject
given an object scan the list, find it and remove it, returns true if found- Specified by:
removeByObjectin interfaceICollection<T>- Overrides:
removeByObjectin classSimpleLockStoredList<T>- Parameters:
obj- element to remove- Returns:
trueif object was removed;falseotherwise (if element wasn't found)
-
contains
is this object contained in the SL ?- Specified by:
containsin interfaceICollection<T>- Overrides:
containsin classSimpleLockStoredList<T>- Parameters:
obj- the element to search for- Returns:
trueif element exists in the StoredList;falseotherwise.
-