@Deprecated public class RwlSegmentedStoredList<T> extends Object implements IStoredList<T>
Constructor and Description |
---|
RwlSegmentedStoredList(IReusableResourcePool<ReadWriteLock> locksPool)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
IObjectInfo<T> |
add(T subject)
Deprecated.
store an element
|
IObjectInfo<T> |
addUnlocked(T subject)
Deprecated.
Store an element in the list, while the SL is unlocked .
|
boolean |
contains(T obj)
Deprecated.
is this object contained in the SL ?
|
void |
dump(org.slf4j.Logger logger,
String msg)
Deprecated.
Dump list content, used for Debug.
|
IStoredListIterator<T> |
establishListScan(boolean random_scan)
Deprecated.
establish a scan position.
|
void |
freeSLHolder(IStoredListIterator<T> slh)
Deprecated.
this method is called by outside scan that want to quit the scan and return the slholder to
the factory
|
int |
getHashCode(int id)
Deprecated.
|
IObjectInfo<T> |
getHead()
Deprecated.
Goes over all the segments and finds the first element.
|
Object |
getKey(int id)
Deprecated.
|
T |
getObjectFromHead()
Deprecated.
Returns the value of the first element in the list (fifo)
|
IStoredList<T> |
getValue(int id)
Deprecated.
|
boolean |
invalidate()
Deprecated.
Sets an indication that this StoredList is invalid.
|
boolean |
isEmpty()
Deprecated.
Returns true if the list is empty
|
boolean |
isIterator()
Deprecated.
is the list an iterator or basic list ?
|
boolean |
isMultiObjectCollection()
Deprecated.
is it an actual multi object container.
|
boolean |
isNativeHashEntry()
Deprecated.
|
IStoredListIterator<T> |
next(IStoredListIterator<T> slh)
Deprecated.
get the next element in scan order
|
boolean |
optimizeScanForSingleObject()
Deprecated.
return true if we can save iterator creation and get a single entry
|
protected void |
remove_impl(com.j_spaces.kernel.list.RwlSegmentedStoredList.Segment<T> segment,
com.j_spaces.kernel.list.RwlSegmentedStoredList.ObjectInfo<T> oi)
Deprecated.
remove an element described by ObjectInfo
|
void |
remove(IObjectInfo<T> poi)
Deprecated.
remove an element described by ObjectInfo
|
boolean |
removeByObject(T obj)
Deprecated.
given an object scan the list, find it and remove it, returns true if found
|
void |
removeUnlocked(IObjectInfo<T> poi)
Deprecated.
Remove an element described by ObjectInfo, while the SL is unlocked.
|
int |
size()
Deprecated.
Returns the amount of elements in the StoredList.
|
protected IObjectInfo<T> |
store_impl(com.j_spaces.kernel.list.RwlSegmentedStoredList.Segment<T> segment,
com.j_spaces.kernel.list.RwlSegmentedStoredList.ObjectInfo<T> oi)
Deprecated.
store an element in segment
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
establishListScan
public RwlSegmentedStoredList(IReusableResourcePool<ReadWriteLock> locksPool)
public int size()
ICollection
size
in interface ICollection<T>
ICollection.isEmpty()
public boolean isEmpty()
isEmpty
in interface ICollection<T>
true
if list is empty; false
otherwise.public IObjectInfo<T> getHead()
getHead
in interface IStoredList<T>
public T getObjectFromHead()
IStoredList
getObjectFromHead
in interface IStoredList<T>
public boolean optimizeScanForSingleObject()
optimizeScanForSingleObject
in interface IStoredList<T>
public IStoredListIterator<T> establishListScan(boolean random_scan)
establishListScan
in interface ICollection<T>
random_scan
- true
enable random scan; false
start from head.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 void freeSLHolder(IStoredListIterator<T> slh)
freeSLHolder
in interface IStoredList<T>
slh
- Holder resource to return to pool; can be null
.public IObjectInfo<T> add(T subject)
add
in interface ICollection<T>
subject
- element to store.null
if
StoredList has been invalidated.public IObjectInfo<T> addUnlocked(T subject)
IStoredList
addUnlocked
in interface IStoredList<T>
subject
- element to store.null
if
StoredList has been invalidated.protected IObjectInfo<T> store_impl(com.j_spaces.kernel.list.RwlSegmentedStoredList.Segment<T> segment, com.j_spaces.kernel.list.RwlSegmentedStoredList.ObjectInfo<T> oi)
public void remove(IObjectInfo<T> poi)
remove
in interface IStoredList<T>
poi
- an existing element between Tail and Headpublic void removeUnlocked(IObjectInfo<T> poi)
IStoredList
removeUnlocked
in interface IStoredList<T>
poi
- an existing element between Tail and Headprotected void remove_impl(com.j_spaces.kernel.list.RwlSegmentedStoredList.Segment<T> segment, com.j_spaces.kernel.list.RwlSegmentedStoredList.ObjectInfo<T> oi)
segment
- TODOpublic boolean removeByObject(T obj)
removeByObject
in interface ICollection<T>
obj
- element to removetrue
if object was removed; false
otherwise (if element
wasn't found)public boolean contains(T obj)
contains
in interface ICollection<T>
obj
- the element to search fortrue
if element exists in the StoredList; false
otherwise.public boolean invalidate()
invalidate
in interface IStoredList<T>
true
if StoredList was set to invalid; false
otherwise.public boolean isMultiObjectCollection()
ICollection
isMultiObjectCollection
in interface ICollection<T>
true
if its an actual list; false
otherwisepublic boolean isIterator()
IObjectsList
isIterator
in interface IObjectsList
public void dump(org.slf4j.Logger logger, String msg)
IStoredList
dump
in interface IStoredList<T>
logger
- logger to usemsg
- message to add in logpublic int getHashCode(int id)
getHashCode
in interface IHashEntry<Object,IStoredList<T>>
public Object getKey(int id)
getKey
in interface IHashEntry<Object,IStoredList<T>>
public IStoredList<T> getValue(int id)
getValue
in interface IHashEntry<Object,IStoredList<T>>
public boolean isNativeHashEntry()
isNativeHashEntry
in interface IHashEntry<Object,IStoredList<T>>
true
if this is a native hashmap entryCopyright © GigaSpaces.