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, wait
hasSize, size
establishListScan
createCopyForAlternatingThread, getAlreadyMatchedIndexPath, isExtensionIndex, isMultiListsIterator, noRematchNeeded
public static final int UID_HASH_INDICATOR
public MemoryBasedEntryCacheInfo(IEntryHolder entryHolder)
public MemoryBasedEntryCacheInfo(IEntryHolder entryHolder, int backRefsSize)
public IEntryHolder getEntryHolder(CacheManager cacheManager)
getEntryHolder
in interface IEntryCacheInfo
public IEntryHolder getEntryHolder()
public IEntryHolder getEntryHolder(CacheManager cacheManager, Context context)
getEntryHolder
in interface IEntryCacheInfo
public boolean isDeleted()
isDeleted
in interface IEntryCacheInfo
public ArrayList<IObjectInfo<IEntryCacheInfo>> getBackRefs()
getBackRefs
in interface IEntryCacheInfo
public void setBackRefs(ArrayList<IObjectInfo<IEntryCacheInfo>> backRefs)
setBackRefs
in interface IEntryCacheInfo
public IObjectInfo<IEntryCacheInfo> getMainListBackRef()
getMainListBackRef
in interface IEntryCacheInfo
public boolean indexesBackRefsKept()
indexesBackRefsKept
in interface IEntryCacheInfo
public void setMainListBackRef(IObjectInfo<IEntryCacheInfo> mainListBackref)
setMainListBackRef
in interface IEntryCacheInfo
public void setLeaseManagerListRefAndPosition(IStoredList<Object> entriesList, IObjectInfo<Object> entryPos)
setLeaseManagerListRefAndPosition
in interface IEntryCacheInfo
setLeaseManagerListRefAndPosition
in interface ILeasedEntryCacheInfo
public IStoredList<Object> getLeaseManagerListRef()
getLeaseManagerListRef
in interface IEntryCacheInfo
getLeaseManagerListRef
in interface ILeasedEntryCacheInfo
public IObjectInfo<Object> getLeaseManagerPosition()
getLeaseManagerPosition
in interface IEntryCacheInfo
getLeaseManagerPosition
in interface ILeasedEntryCacheInfo
public boolean isConnectedToLeaseManager()
isConnectedToLeaseManager
in interface IEntryCacheInfo
isConnectedToLeaseManager
in interface ILeasedEntryCacheInfo
public boolean isSameLeaseManagerRef(ILeasedEntryCacheInfo other)
isSameLeaseManagerRef
in interface IEntryCacheInfo
isSameLeaseManagerRef
in interface ILeasedEntryCacheInfo
public boolean isBlobStoreEntry()
isBlobStoreEntry
in interface ILeasedEntryCacheInfo
public Object getObjectStoredInLeaseManager()
getObjectStoredInLeaseManager
in interface ILeasedEntryCacheInfo
public IServerTypeDesc getServerTypeDesc()
getServerTypeDesc
in interface IEntryCacheInfo
public int getLatestIndexCreationNumber()
getLatestIndexCreationNumber
in interface IEntryCacheInfo
public void setLatestIndexCreationNumber(int val)
setLatestIndexCreationNumber
in interface IEntryCacheInfo
public String getClassName()
getClassName
in interface IEntryCacheInfo
public void setEvictionPayLoad(Object evictionBackRef)
setEvictionPayLoad
in interface EvictableServerEntry
public Object getEvictionPayLoad()
getEvictionPayLoad
in interface EvictableServerEntry
public boolean isTransient()
public String getUID()
EvictableServerEntry
getUID
in interface EvictableServerEntry
public void setInCache(boolean checkPendingPin)
setInCache
in interface IEntryCacheInfo
public boolean isInCache()
public boolean isInserted()
public boolean setPinned(boolean value, boolean waitIfPendingInsertion)
setPinned
in interface IEntryCacheInfo
public boolean setPinned(boolean value)
setPinned
in interface IEntryCacheInfo
public boolean isPinned()
isPinned
in interface IEntryCacheInfo
public boolean setRemoving(boolean isPinned)
setRemoving
in interface IEntryCacheInfo
public boolean isRemoving()
isRemoving
in interface IEntryCacheInfo
public void setRemoved()
setRemoved
in interface IEntryCacheInfo
public boolean isRemoved()
isRemoved
in interface IEntryCacheInfo
public boolean isRemovingOrRemoved()
isRemovingOrRemoved
in interface IEntryCacheInfo
public boolean wasInserted()
wasInserted
in interface IEntryCacheInfo
public boolean isRecentDelete()
isRecentDelete
in interface IEntryCacheInfo
public void setRecentDelete()
setRecentDelete
in interface IEntryCacheInfo
public boolean preMatch(Context context, ITemplateHolder template)
preMatch
in interface IEntryCacheInfo
public IObjectInfo<IEntryCacheInfo> getHead()
IStoredList
getHead
in interface IStoredList<IEntryCacheInfo>
public IEntryCacheInfo getObjectFromHead()
IStoredList
getObjectFromHead
in interface IStoredList<IEntryCacheInfo>
public void freeSLHolder(IStoredListIterator slh)
IStoredList
freeSLHolder
in interface IStoredList<IEntryCacheInfo>
slh
- Holder resource to return to pool; can be null
.public void remove(IObjectInfo oi)
IStoredList
remove
in interface IStoredList<IEntryCacheInfo>
oi
- an existing element between Tail and Headpublic void removeUnlocked(IObjectInfo oi)
IStoredList
removeUnlocked
in interface IStoredList<IEntryCacheInfo>
oi
- an existing element between Tail and Headpublic boolean invalidate()
IStoredList
invalidate
in interface IStoredList<IEntryCacheInfo>
true
if StoredList was set to invalid; false
otherwise.public void dump(org.slf4j.Logger logger, String msg)
IStoredList
dump
in interface IStoredList<IEntryCacheInfo>
logger
- logger to usemsg
- message to add in logpublic boolean isEmpty()
ICollection
isEmpty
in interface ICollection<IEntryCacheInfo>
true
if list is empty; false
otherwise.public IStoredListIterator<IEntryCacheInfo> establishListScan(boolean random_scan)
ICollection
establishListScan
in interface ICollection<IEntryCacheInfo>
random_scan
- true
enable random scan; false
start from head.public IStoredListIterator<IEntryCacheInfo> next(IStoredListIterator<IEntryCacheInfo> slh)
ICollection
SLHolder
s subject.next
in interface ICollection<IEntryCacheInfo>
slh
- Holder representing a pivot position.null
if reached end of scan.public IObjectInfo<IEntryCacheInfo> add(IEntryCacheInfo subject)
ICollection
add
in interface ICollection<IEntryCacheInfo>
subject
- element to store.null
if
StoredList has been invalidated.public IObjectInfo<IEntryCacheInfo> addUnlocked(IEntryCacheInfo subject)
IStoredList
addUnlocked
in interface IStoredList<IEntryCacheInfo>
subject
- element to store.null
if
StoredList has been invalidated.public boolean removeByObject(IEntryCacheInfo obj)
ICollection
removeByObject
in interface ICollection<IEntryCacheInfo>
obj
- element to removetrue
if object was removed; false
otherwise (if element
wasn't found)public boolean contains(IEntryCacheInfo obj)
ICollection
contains
in interface ICollection<IEntryCacheInfo>
obj
- the element to search fortrue
if element exists in the StoredList; false
otherwise.public void setSubject(IEntryCacheInfo subject)
IObjectInfo
setSubject
in interface IObjectInfo<IEntryCacheInfo>
setSubject
in interface IStoredListIterator<IEntryCacheInfo>
subject
- The subject to set.public IEntryCacheInfo getSubject()
IStoredListIterator
getSubject
in interface IObjectInfo<IEntryCacheInfo>
getSubject
in interface IStoredListIterator<IEntryCacheInfo>
public boolean isMultiObjectCollection()
ICollection
isMultiObjectCollection
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>
SAException
public IEntryCacheInfo next() throws SAException
next
in interface IScanListIterator<IEntryCacheInfo>
SAException
public void releaseScan() throws SAException
releaseScan
in interface IScanListIterator<IEntryCacheInfo>
SAException
public int getAlreadyMatchedFixedPropertyIndexPos()
getAlreadyMatchedFixedPropertyIndexPos
in interface IScanListIterator<IEntryCacheInfo>
public boolean isAlreadyMatched()
isAlreadyMatched
in interface IScanListIterator<IEntryCacheInfo>
public boolean isIterator()
IObjectsList
isIterator
in interface IObjectsList
public SpaceTypeDescriptor getSpaceTypeDescriptor()
getSpaceTypeDescriptor
in interface ServerEntry
public Object getFixedPropertyValue(int position)
getFixedPropertyValue
in interface ServerEntry
position
- Position of requested property.public Object getPropertyValue(String name)
getPropertyValue
in interface ServerEntry
name
- Name of requested property.public Object getPathValue(String path)
ServerEntry
getPathValue
in interface ServerEntry
path
- Path pointing to the requested property.public int getVersion()
getVersion
in interface ServerEntry
public long getExpirationTime()
getExpirationTime
in interface ServerEntry
public 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()
IStoredListIterator
release
in interface IStoredListIterator<IEntryCacheInfo>
Resource.release()
Copyright © GigaSpaces.