public class MemoryBasedEntryCacheInfo extends Object implements IEntryCacheInfo
| Modifier and Type | Field and Description |
|---|---|
static int |
UID_HASH_INDICATOR |
| Constructor and Description |
|---|
MemoryBasedEntryCacheInfo(IEntryHolder entryHolder)
Const used only for snapshots, called from CacheManager.prePrepare(Context,
ServerTransaction).
|
MemoryBasedEntryCacheInfo(IEntryHolder entryHolder,
int backRefsSize) |
| Modifier and Type | Method and Description |
|---|---|
IObjectInfo<IEntryCacheInfo> |
add(IEntryCacheInfo subject)
Store an element in the list.
|
IObjectInfo<IEntryCacheInfo> |
addUnlocked(IEntryCacheInfo subject)
Store an element in the list, while the SL is unlocked .
|
boolean |
contains(IEntryCacheInfo obj)
Checks whether it contains the specified element.
|
void |
dump(org.slf4j.Logger logger,
String msg)
Dump list content, used for Debug.
|
IStoredListIterator<IEntryCacheInfo> |
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 |
getAlreadyMatchedFixedPropertyIndexPos()
if the scan is on a property index, currently supported for extended index
|
ArrayList<IObjectInfo<IEntryCacheInfo>> |
getBackRefs() |
String |
getClassName() |
IEntryHolder |
getEntryHolder() |
IEntryHolder |
getEntryHolder(CacheManager cacheManager) |
IEntryHolder |
getEntryHolder(CacheManager cacheManager,
Context context) |
Object |
getEvictionPayLoad()
in order to avoid searching the eviction handler data structures when an existing entry is
rendered to it by the space cache manager, the eviction-handler may store a backref to the
entry in it data structure and retrieve it later
|
long |
getExpirationTime()
Gets the entry expiration time.
|
Object |
getFixedPropertyValue(int position)
Gets the specified fixed property's value.
|
int |
getHashCode(int id) |
IObjectInfo<IEntryCacheInfo> |
getHead()
Returns the first element in the list (fifo)
|
Object |
getKey(int id) |
int |
getLatestIndexCreationNumber() |
IStoredList<Object> |
getLeaseManagerListRef() |
IObjectInfo<Object> |
getLeaseManagerPosition() |
IObjectInfo<IEntryCacheInfo> |
getMainListBackRef() |
IEntryCacheInfo |
getObjectFromHead()
Returns the value of the first element in the list (fifo)
|
Object |
getObjectStoredInLeaseManager() |
Object |
getPathValue(String path)
Gets the specified path's value.
|
Object |
getPropertyValue(String name)
Gets the specified property's value.
|
IServerTypeDesc |
getServerTypeDesc() |
SpaceTypeDescriptor |
getSpaceTypeDescriptor()
Gets the entry's type descriptor.
|
IEntryCacheInfo |
getSubject()
Gets the subject pointed to by the cursor's scan.
|
String |
getUID()
Returns the entry unique space identifier.
|
IStoredList<IEntryCacheInfo> |
getValue(int id) |
int |
getVersion()
Gets the entry version.
|
boolean |
hasNext() |
boolean |
indexesBackRefsKept() |
boolean |
invalidate()
Sets an indication that this StoredList is invalid.
|
boolean |
isAlreadyMatched()
is the entry returned already matched against the searching template currently is true if the
underlying scan made by CacheManager::EntriesIter
|
boolean |
isBlobStoreEntry() |
boolean |
isConnectedToLeaseManager() |
boolean |
isDeleted() |
boolean |
isEmpty()
Returns true if this list is empty, i.e.
|
boolean |
isInCache() |
boolean |
isInserted() |
boolean |
isIterator()
is the list an iterator or basic list ?
|
boolean |
isMultiObjectCollection()
is it an actual multi object container.
|
boolean |
isNativeHashEntry() |
boolean |
isPinned() |
boolean |
isRecentDelete() |
boolean |
isRemoved() |
boolean |
isRemoving() |
boolean |
isRemovingOrRemoved() |
boolean |
isSameLeaseManagerRef(ILeasedEntryCacheInfo other) |
boolean |
isTransient() |
IEntryCacheInfo |
next() |
IStoredListIterator<IEntryCacheInfo> |
next(IStoredListIterator<IEntryCacheInfo> slh)
Returns the next element in the scan order.
|
boolean |
optimizeScanForSingleObject()
return true if we can save iterator creation and get a single entry
|
boolean |
preMatch(Context context,
ITemplateHolder template) |
void |
release()
Release of this SLHolder resource
|
void |
releaseScan()
release SLHolder for this scan
|
void |
remove(IObjectInfo oi)
Remove an element described by ObjectInfo.
|
boolean |
removeByObject(IEntryCacheInfo 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 |
setBackRefs(ArrayList<IObjectInfo<IEntryCacheInfo>> backRefs) |
void |
setEvictionPayLoad(Object evictionBackRef)
in order to avoid searching the eviction handler data structures when an existing entry is
rendered to it by the space cache manager, the eviction-handler may store a backref to the
entry in it data structure and retrieve it later
|
void |
setInCache(boolean checkPendingPin) |
void |
setLatestIndexCreationNumber(int val) |
void |
setLeaseManagerListRefAndPosition(IStoredList<Object> entriesList,
IObjectInfo<Object> entryPos) |
void |
setMainListBackRef(IObjectInfo<IEntryCacheInfo> mainListBackref) |
boolean |
setPinned(boolean value) |
boolean |
setPinned(boolean value,
boolean waitIfPendingInsertion) |
void |
setRecentDelete() |
void |
setRemoved() |
boolean |
setRemoving(boolean isPinned) |
void |
setSubject(IEntryCacheInfo subject)
Sets the subject for this node.
|
boolean |
wasInserted() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithasSize, sizeestablishListScancreateCopyForAlternatingThread, getAlreadyMatchedIndexPath, isExtensionIndex, isMultiListsIterator, noRematchNeededpublic static final int UID_HASH_INDICATOR
public MemoryBasedEntryCacheInfo(IEntryHolder entryHolder)
public MemoryBasedEntryCacheInfo(IEntryHolder entryHolder, int backRefsSize)
public IEntryHolder getEntryHolder(CacheManager cacheManager)
getEntryHolder in interface IEntryCacheInfopublic IEntryHolder getEntryHolder()
public IEntryHolder getEntryHolder(CacheManager cacheManager, Context context)
getEntryHolder in interface IEntryCacheInfopublic boolean isDeleted()
isDeleted in interface IEntryCacheInfopublic ArrayList<IObjectInfo<IEntryCacheInfo>> getBackRefs()
getBackRefs in interface IEntryCacheInfopublic void setBackRefs(ArrayList<IObjectInfo<IEntryCacheInfo>> backRefs)
setBackRefs in interface IEntryCacheInfopublic IObjectInfo<IEntryCacheInfo> getMainListBackRef()
getMainListBackRef in interface IEntryCacheInfopublic boolean indexesBackRefsKept()
indexesBackRefsKept in interface IEntryCacheInfopublic void setMainListBackRef(IObjectInfo<IEntryCacheInfo> mainListBackref)
setMainListBackRef in interface IEntryCacheInfopublic void setLeaseManagerListRefAndPosition(IStoredList<Object> entriesList, IObjectInfo<Object> entryPos)
setLeaseManagerListRefAndPosition in interface IEntryCacheInfosetLeaseManagerListRefAndPosition in interface ILeasedEntryCacheInfopublic IStoredList<Object> getLeaseManagerListRef()
getLeaseManagerListRef in interface IEntryCacheInfogetLeaseManagerListRef in interface ILeasedEntryCacheInfopublic IObjectInfo<Object> getLeaseManagerPosition()
getLeaseManagerPosition in interface IEntryCacheInfogetLeaseManagerPosition in interface ILeasedEntryCacheInfopublic boolean isConnectedToLeaseManager()
isConnectedToLeaseManager in interface IEntryCacheInfoisConnectedToLeaseManager in interface ILeasedEntryCacheInfopublic boolean isSameLeaseManagerRef(ILeasedEntryCacheInfo other)
isSameLeaseManagerRef in interface IEntryCacheInfoisSameLeaseManagerRef in interface ILeasedEntryCacheInfopublic boolean isBlobStoreEntry()
isBlobStoreEntry in interface ILeasedEntryCacheInfopublic Object getObjectStoredInLeaseManager()
getObjectStoredInLeaseManager in interface ILeasedEntryCacheInfopublic IServerTypeDesc getServerTypeDesc()
getServerTypeDesc in interface IEntryCacheInfopublic int getLatestIndexCreationNumber()
getLatestIndexCreationNumber in interface IEntryCacheInfopublic void setLatestIndexCreationNumber(int val)
setLatestIndexCreationNumber in interface IEntryCacheInfopublic String getClassName()
getClassName in interface IEntryCacheInfopublic void setEvictionPayLoad(Object evictionBackRef)
setEvictionPayLoad in interface EvictableServerEntrypublic Object getEvictionPayLoad()
getEvictionPayLoad in interface EvictableServerEntrypublic boolean isTransient()
public String getUID()
EvictableServerEntrygetUID in interface EvictableServerEntrypublic void setInCache(boolean checkPendingPin)
setInCache in interface IEntryCacheInfopublic boolean isInCache()
public boolean isInserted()
public boolean setPinned(boolean value,
boolean waitIfPendingInsertion)
setPinned in interface IEntryCacheInfopublic boolean setPinned(boolean value)
setPinned in interface IEntryCacheInfopublic boolean isPinned()
isPinned in interface IEntryCacheInfopublic boolean setRemoving(boolean isPinned)
setRemoving in interface IEntryCacheInfopublic boolean isRemoving()
isRemoving in interface IEntryCacheInfopublic void setRemoved()
setRemoved in interface IEntryCacheInfopublic boolean isRemoved()
isRemoved in interface IEntryCacheInfopublic boolean isRemovingOrRemoved()
isRemovingOrRemoved in interface IEntryCacheInfopublic boolean wasInserted()
wasInserted in interface IEntryCacheInfopublic boolean isRecentDelete()
isRecentDelete in interface IEntryCacheInfopublic void setRecentDelete()
setRecentDelete in interface IEntryCacheInfopublic boolean preMatch(Context context, ITemplateHolder template)
preMatch in interface IEntryCacheInfopublic IObjectInfo<IEntryCacheInfo> getHead()
IStoredListgetHead in interface IStoredList<IEntryCacheInfo>public IEntryCacheInfo getObjectFromHead()
IStoredListgetObjectFromHead in interface IStoredList<IEntryCacheInfo>public void freeSLHolder(IStoredListIterator slh)
IStoredListfreeSLHolder in interface IStoredList<IEntryCacheInfo>slh - Holder resource to return to pool; can be null.public void remove(IObjectInfo oi)
IStoredListremove in interface IStoredList<IEntryCacheInfo>oi - an existing element between Tail and Headpublic void removeUnlocked(IObjectInfo oi)
IStoredListremoveUnlocked in interface IStoredList<IEntryCacheInfo>oi - an existing element between Tail and Headpublic boolean invalidate()
IStoredListinvalidate in interface IStoredList<IEntryCacheInfo>true if StoredList was set to invalid; false otherwise.public void dump(org.slf4j.Logger logger,
String msg)
IStoredListdump in interface IStoredList<IEntryCacheInfo>logger - logger to usemsg - message to add in logpublic boolean isEmpty()
ICollectionisEmpty in interface ICollection<IEntryCacheInfo>true if list is empty; false otherwise.public IStoredListIterator<IEntryCacheInfo> establishListScan(boolean random_scan)
ICollectionestablishListScan in interface ICollection<IEntryCacheInfo>random_scan - true enable random scan; false start from head.public IStoredListIterator<IEntryCacheInfo> next(IStoredListIterator<IEntryCacheInfo> slh)
ICollectionSLHolders subject.next in interface ICollection<IEntryCacheInfo>slh - Holder representing a pivot position.null if reached end of scan.public IObjectInfo<IEntryCacheInfo> add(IEntryCacheInfo subject)
ICollectionadd in interface ICollection<IEntryCacheInfo>subject - element to store.null if
StoredList has been invalidated.public IObjectInfo<IEntryCacheInfo> addUnlocked(IEntryCacheInfo subject)
IStoredListaddUnlocked in interface IStoredList<IEntryCacheInfo>subject - element to store.null if
StoredList has been invalidated.public boolean removeByObject(IEntryCacheInfo obj)
ICollectionremoveByObject in interface ICollection<IEntryCacheInfo>obj - element to removetrue if object was removed; false otherwise (if element
wasn't found)public boolean contains(IEntryCacheInfo obj)
ICollectioncontains in interface ICollection<IEntryCacheInfo>obj - the element to search fortrue if element exists in the StoredList; false otherwise.public void setSubject(IEntryCacheInfo subject)
IObjectInfosetSubject in interface IObjectInfo<IEntryCacheInfo>setSubject in interface IStoredListIterator<IEntryCacheInfo>subject - The subject to set.public IEntryCacheInfo getSubject()
IStoredListIteratorgetSubject in interface IObjectInfo<IEntryCacheInfo>getSubject in interface IStoredListIterator<IEntryCacheInfo>public boolean isMultiObjectCollection()
ICollectionisMultiObjectCollection in interface ICollection<IEntryCacheInfo>true if its an actual list; false otherwisepublic boolean optimizeScanForSingleObject()
optimizeScanForSingleObject in interface IStoredList<IEntryCacheInfo>public boolean hasNext()
throws SAException
hasNext in interface IScanListIterator<IEntryCacheInfo>SAExceptionpublic IEntryCacheInfo next() throws SAException
next in interface IScanListIterator<IEntryCacheInfo>SAExceptionpublic void releaseScan()
throws SAException
releaseScan in interface IScanListIterator<IEntryCacheInfo>SAExceptionpublic int getAlreadyMatchedFixedPropertyIndexPos()
getAlreadyMatchedFixedPropertyIndexPos in interface IScanListIterator<IEntryCacheInfo>public boolean isAlreadyMatched()
isAlreadyMatched in interface IScanListIterator<IEntryCacheInfo>public boolean isIterator()
IObjectsListisIterator in interface IObjectsListpublic SpaceTypeDescriptor getSpaceTypeDescriptor()
getSpaceTypeDescriptor in interface ServerEntrypublic Object getFixedPropertyValue(int position)
getFixedPropertyValue in interface ServerEntryposition - Position of requested property.public Object getPropertyValue(String name)
getPropertyValue in interface ServerEntryname - Name of requested property.public Object getPathValue(String path)
ServerEntrygetPathValue in interface ServerEntrypath - Path pointing to the requested property.public int getVersion()
getVersion in interface ServerEntrypublic long getExpirationTime()
getExpirationTime in interface ServerEntrypublic int getHashCode(int id)
getHashCode in interface IHashEntry<Object,IStoredList<IEntryCacheInfo>>public Object getKey(int id)
getKey in interface IHashEntry<Object,IStoredList<IEntryCacheInfo>>public IStoredList<IEntryCacheInfo> getValue(int id)
getValue in interface IHashEntry<Object,IStoredList<IEntryCacheInfo>>public boolean isNativeHashEntry()
isNativeHashEntry in interface IHashEntry<Object,IStoredList<IEntryCacheInfo>>true if this is a native hashmap entrypublic void release()
IStoredListIteratorrelease in interface IStoredListIterator<IEntryCacheInfo>Resource.release()Copyright © GigaSpaces.