public class TemplateCacheInfo extends Object implements ILeasedEntryCacheInfo, IStoredList<TemplateCacheInfo>, IStoredListIterator<TemplateCacheInfo>, IObjectInfo<TemplateCacheInfo>
Modifier and Type | Field and Description |
---|---|
ArrayList<IObjectInfo<TemplateCacheInfo>> |
m_BackRefs |
ITemplateHolder |
m_TemplateHolder |
Constructor and Description |
---|
TemplateCacheInfo(ITemplateHolder templateHolder) |
Modifier and Type | Method and Description |
---|---|
IObjectInfo<TemplateCacheInfo> |
add(TemplateCacheInfo subject)
Store an element in the list.
|
IObjectInfo<TemplateCacheInfo> |
addUnlocked(TemplateCacheInfo subject)
Store an element in the list, while the SL is unlocked .
|
boolean |
contains(TemplateCacheInfo obj)
Checks whether it contains the specified element.
|
void |
dump(org.slf4j.Logger logger,
String msg)
Dump list content, used for Debug.
|
IStoredListIterator<TemplateCacheInfo> |
establishListScan(boolean random_scan)
establish a scan position.
|
void |
freeSLHolder(IStoredListIterator slh)
Called by an outside scan that wants to quit the scan and return the slholder to the resource
pool.
|
int |
getHashCode(int id) |
IObjectInfo<TemplateCacheInfo> |
getHead()
Returns the first element in the list (fifo)
|
int |
getIndexPos() |
Object |
getKey(int id) |
int |
getLatestIndexCreationNumber() |
IStoredList<Object> |
getLeaseManagerListRef() |
IObjectInfo<Object> |
getLeaseManagerPosition() |
TemplateCacheInfo |
getObjectFromHead()
Returns the value of the first element in the list (fifo)
|
Object |
getObjectStoredInLeaseManager() |
TemplateCacheInfo |
getSubject()
Gets the subject pointed to by the cursor's scan.
|
IStoredList<TemplateCacheInfo> |
getValue(int id) |
boolean |
hasNext() |
void |
initBackRefs(int numOfIndexes) |
boolean |
invalidate()
Sets an indication that this StoredList is invalid.
|
boolean |
isBlobStoreEntry() |
boolean |
isConnectedToLeaseManager() |
boolean |
isEmpty()
Returns true if this list is empty, i.e.
|
boolean |
isIterator()
is the list an iterator or basic list ?
|
boolean |
isMultiObjectCollection()
is it an actual multi object container.
|
boolean |
isMultiValueIterator() |
boolean |
isNativeHashEntry() |
boolean |
isSameLeaseManagerRef(ILeasedEntryCacheInfo other) |
TemplateCacheInfo |
next() |
IStoredListIterator<TemplateCacheInfo> |
next(IStoredListIterator<TemplateCacheInfo> slh)
Returns the next element in the scan order.
|
boolean |
optimizeScanForSingleObject()
return true if we can save iterator creation and get a single entry
|
void |
release()
Release of this SLHolder resource
|
void |
releaseScan() |
void |
remove() |
void |
remove(IObjectInfo oi)
Remove an element described by ObjectInfo.
|
boolean |
removeByObject(TemplateCacheInfo obj)
Given an element scan the list, find it and remove it.
|
void |
removeUnlocked(IObjectInfo oi)
Remove an element described by ObjectInfo, while the SL is unlocked.
|
void |
setLatestIndexCreationNumber(int val) |
void |
setLeaseManagerListRefAndPosition(IStoredList<Object> entriesList,
IObjectInfo<Object> entryPos) |
void |
setSubject(TemplateCacheInfo subject)
Sets the subject pointed to by the cursor's scan.
|
int |
size()
Returns the amount of elements in the StoredList.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
establishListScan
public ArrayList<IObjectInfo<TemplateCacheInfo>> m_BackRefs
public final ITemplateHolder m_TemplateHolder
public TemplateCacheInfo(ITemplateHolder templateHolder)
public void initBackRefs(int numOfIndexes)
public void setLeaseManagerListRefAndPosition(IStoredList<Object> entriesList, IObjectInfo<Object> entryPos)
setLeaseManagerListRefAndPosition
in interface ILeasedEntryCacheInfo
public IStoredList<Object> getLeaseManagerListRef()
getLeaseManagerListRef
in interface ILeasedEntryCacheInfo
public IObjectInfo<Object> getLeaseManagerPosition()
getLeaseManagerPosition
in interface ILeasedEntryCacheInfo
public boolean isConnectedToLeaseManager()
isConnectedToLeaseManager
in interface ILeasedEntryCacheInfo
public boolean isSameLeaseManagerRef(ILeasedEntryCacheInfo other)
isSameLeaseManagerRef
in interface ILeasedEntryCacheInfo
public boolean isBlobStoreEntry()
isBlobStoreEntry
in interface ILeasedEntryCacheInfo
public Object getObjectStoredInLeaseManager()
getObjectStoredInLeaseManager
in interface ILeasedEntryCacheInfo
public int getLatestIndexCreationNumber()
public void setLatestIndexCreationNumber(int val)
public IObjectInfo<TemplateCacheInfo> getHead()
IStoredList
getHead
in interface IStoredList<TemplateCacheInfo>
public TemplateCacheInfo getObjectFromHead()
IStoredList
getObjectFromHead
in interface IStoredList<TemplateCacheInfo>
public void freeSLHolder(IStoredListIterator slh)
IStoredList
freeSLHolder
in interface IStoredList<TemplateCacheInfo>
slh
- Holder resource to return to pool; can be null
.public void remove(IObjectInfo oi)
IStoredList
remove
in interface IStoredList<TemplateCacheInfo>
oi
- an existing element between Tail and Headpublic void removeUnlocked(IObjectInfo oi)
IStoredList
removeUnlocked
in interface IStoredList<TemplateCacheInfo>
oi
- an existing element between Tail and Headpublic boolean invalidate()
IStoredList
invalidate
in interface IStoredList<TemplateCacheInfo>
true
if StoredList was set to invalid; false
otherwise.public void dump(org.slf4j.Logger logger, String msg)
IStoredList
dump
in interface IStoredList<TemplateCacheInfo>
logger
- logger to usemsg
- message to add in logpublic int size()
ICollection
size
in interface ICollection<TemplateCacheInfo>
ICollection.isEmpty()
public boolean isEmpty()
ICollection
isEmpty
in interface ICollection<TemplateCacheInfo>
true
if list is empty; false
otherwise.public IStoredListIterator<TemplateCacheInfo> establishListScan(boolean random_scan)
ICollection
establishListScan
in interface ICollection<TemplateCacheInfo>
random_scan
- true
enable random scan; false
start from head.public IStoredListIterator<TemplateCacheInfo> next(IStoredListIterator<TemplateCacheInfo> slh)
ICollection
SLHolder
s subject.next
in interface ICollection<TemplateCacheInfo>
slh
- Holder representing a pivot position.null
if reached end of scan.public IObjectInfo<TemplateCacheInfo> add(TemplateCacheInfo subject)
ICollection
add
in interface ICollection<TemplateCacheInfo>
subject
- element to store.null
if
StoredList has been invalidated.public IObjectInfo<TemplateCacheInfo> addUnlocked(TemplateCacheInfo subject)
IStoredList
addUnlocked
in interface IStoredList<TemplateCacheInfo>
subject
- element to store.null
if
StoredList has been invalidated.public boolean removeByObject(TemplateCacheInfo obj)
ICollection
removeByObject
in interface ICollection<TemplateCacheInfo>
obj
- element to removetrue
if object was removed; false
otherwise (if element
wasn't found)public boolean contains(TemplateCacheInfo obj)
ICollection
contains
in interface ICollection<TemplateCacheInfo>
obj
- the element to search fortrue
if element exists in the StoredList; false
otherwise.public void setSubject(TemplateCacheInfo subject)
IStoredListIterator
setSubject
in interface IObjectInfo<TemplateCacheInfo>
setSubject
in interface IStoredListIterator<TemplateCacheInfo>
subject
- The subject to set.public TemplateCacheInfo getSubject()
IStoredListIterator
getSubject
in interface IObjectInfo<TemplateCacheInfo>
getSubject
in interface IStoredListIterator<TemplateCacheInfo>
public boolean isMultiObjectCollection()
ICollection
isMultiObjectCollection
in interface ICollection<TemplateCacheInfo>
true
if its an actual list; false
otherwisepublic boolean optimizeScanForSingleObject()
optimizeScanForSingleObject
in interface IStoredList<TemplateCacheInfo>
public int getHashCode(int id)
getHashCode
in interface IHashEntry<Object,IStoredList<TemplateCacheInfo>>
public Object getKey(int id)
getKey
in interface IHashEntry<Object,IStoredList<TemplateCacheInfo>>
public IStoredList<TemplateCacheInfo> getValue(int id)
getValue
in interface IHashEntry<Object,IStoredList<TemplateCacheInfo>>
public boolean isNativeHashEntry()
isNativeHashEntry
in interface IHashEntry<Object,IStoredList<TemplateCacheInfo>>
true
if this is a native hashmap entrypublic void release()
IStoredListIterator
release
in interface IStoredListIterator<TemplateCacheInfo>
Resource.release()
public boolean isMultiValueIterator()
public void releaseScan()
public int getIndexPos()
public boolean hasNext()
public TemplateCacheInfo next()
public void remove()
public boolean isIterator()
IObjectsList
isIterator
in interface IObjectsList
Copyright © GigaSpaces.