public class OffHeapRefEntryCacheInfo extends Object implements IEntryCacheInfo, IOffHeapRefCacheInfo, ILockObject
UID_HASH_INDICATOR
Constructor and Description |
---|
OffHeapRefEntryCacheInfo(IEntryHolder eh) |
OffHeapRefEntryCacheInfo(IEntryHolder eh,
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 .
|
void |
buildCrcForFields() |
void |
bulkRegister(Context context,
BlobStoreBulkInfo bulkInfo,
int spaceOperation,
boolean registerDirectPersistency) |
void |
bulkUnRegister(CacheManager cacheManager) |
boolean |
contains(IEntryCacheInfo obj)
Checks whether it contains the specified element.
|
void |
dump(Logger logger,
String msg)
Dump list content, used for Debug.
|
IStoredListIterator<IEntryCacheInfo> |
establishListScan(boolean random_scan)
establish a scan position.
|
void |
flush(CacheManager cacheManager,
Context context) |
void |
flushedFromBulk(CacheManager cacheManager,
Object offHeapPos,
boolean removed) |
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
|
String |
getAlreadyMatchedIndexPath() |
ArrayList<IObjectInfo<IEntryCacheInfo>> |
getBackRefs() |
String |
getClassName() |
IEntryHolder |
getEntryHolder() |
IEntryHolder |
getEntryHolder(CacheManager cacheManager) |
IEntryHolder |
getEntryHolder(CacheManager cacheManager,
Context context) |
IEntryHolder |
getEntryHolderIfInMemory() |
Serializable |
getEntryLayout(CacheManager cacheManager) |
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 payload 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.
|
OffHeapEntryHolder |
getFromInternalCache(CacheManager cacheManager) |
int |
getHashCode(int id) |
IObjectInfo<IEntryCacheInfo> |
getHead()
Returns the first element in the list (fifo)
|
Object |
getKey(int id) |
IEntryHolder |
getLatestEntryVersion(CacheManager cacheManager,
boolean attach,
IOffHeapEntryHolder lastKnownEntry,
Context attachingContext) |
IEntryHolder |
getLatestEntryVersion(CacheManager cacheManager,
boolean attach,
IOffHeapEntryHolder lastKnownEntry,
Context attachingContext,
boolean onlyIndexesPart) |
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 |
getOffHeapStoragePos() |
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.
|
Serializable |
getStorageKey() |
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() |
void |
insertOrTouchInternalCache(CacheManager cacheManager,
OffHeapEntryHolder entry) |
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 |
isBulkFlushing() |
boolean |
isConnectedToLeaseManager() |
boolean |
isDeleted() |
boolean |
isEmpty()
Returns true if this list is empty, i.e.
|
boolean |
isInBulk() |
boolean |
isInOffHeapStorage() |
boolean |
isIterator()
is the list an iterator or basic list ?
|
boolean |
isLockSubject()
returns true if the lock object is the subject itself (i.e.
|
boolean |
isMultiObjectCollection()
is it an actual multi object container.
|
boolean |
isNativeHashEntry() |
boolean |
isOffHeapEntry() |
boolean |
isPhantom() |
boolean |
isPinned() |
boolean |
isRecentDelete() |
boolean |
isRemoved() |
boolean |
isRemoving() |
boolean |
isRemovingOrRemoved() |
boolean |
isSameLeaseManagerRef(ILeasedEntryCacheInfo other) |
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 |
removeEntryFromOffHeapStorage(CacheManager cacheManager) |
void |
removeUnlocked(IObjectInfo oi)
Remove an element described by ObjectInfo, while the SL is unlocked.
|
void |
resetNonTransactionalFailedBlobstoreOpStatus(CacheManager cm) |
void |
setBackRefs(ArrayList<IObjectInfo<IEntryCacheInfo>> backRefs) |
boolean |
setBulkFlushing(BlobStoreBulkInfo caller) |
void |
setDeleted(boolean deleted) |
void |
setDirty(boolean value,
CacheManager cacheManager) |
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 payload 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) |
void |
setOffHeapPosition(Object pos) |
void |
setOffHeapVersion(short offHeapVersion) |
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.
|
int |
size()
Returns the amount of elements in the StoredList.
|
void |
unLoadFullEntryIfPossible(CacheManager cacheManager,
Context context) |
void |
unLoadFullEntryIfPossible(CacheManager cacheManager,
Context context,
InternalCacheControl internalCacheControl) |
boolean |
wasInserted() |
public OffHeapRefEntryCacheInfo(IEntryHolder eh, int backRefsSize)
public OffHeapRefEntryCacheInfo(IEntryHolder eh)
public boolean isInOffHeapStorage()
isInOffHeapStorage
in interface IOffHeapRefCacheInfo
public Object getOffHeapStoragePos()
getOffHeapStoragePos
in interface IOffHeapRefCacheInfo
public void setOffHeapVersion(short offHeapVersion)
setOffHeapVersion
in interface IOffHeapRefCacheInfo
public void setDirty(boolean value, CacheManager cacheManager)
setDirty
in interface IOffHeapRefCacheInfo
public void flushedFromBulk(CacheManager cacheManager, Object offHeapPos, boolean removed)
flushedFromBulk
in interface IOffHeapRefCacheInfo
public void buildCrcForFields()
buildCrcForFields
in interface IOffHeapRefCacheInfo
public boolean isBulkFlushing()
isBulkFlushing
in interface IOffHeapRefCacheInfo
public boolean setBulkFlushing(BlobStoreBulkInfo caller)
setBulkFlushing
in interface IOffHeapRefCacheInfo
public IServerTypeDesc getServerTypeDesc()
getServerTypeDesc
in interface IEntryCacheInfo
public void setDeleted(boolean deleted)
setDeleted
in interface IOffHeapRefCacheInfo
public boolean isPhantom()
isPhantom
in interface IOffHeapRefCacheInfo
public void removeEntryFromOffHeapStorage(CacheManager cacheManager)
removeEntryFromOffHeapStorage
in interface IOffHeapRefCacheInfo
public IEntryHolder getLatestEntryVersion(CacheManager cacheManager, boolean attach, IOffHeapEntryHolder lastKnownEntry, Context attachingContext)
getLatestEntryVersion
in interface IOffHeapRefCacheInfo
public void resetNonTransactionalFailedBlobstoreOpStatus(CacheManager cm)
resetNonTransactionalFailedBlobstoreOpStatus
in interface IOffHeapRefCacheInfo
public IEntryHolder getLatestEntryVersion(CacheManager cacheManager, boolean attach, IOffHeapEntryHolder lastKnownEntry, Context attachingContext, boolean onlyIndexesPart)
getLatestEntryVersion
in interface IOffHeapRefCacheInfo
public OffHeapEntryHolder getFromInternalCache(CacheManager cacheManager)
getFromInternalCache
in interface IOffHeapRefCacheInfo
public void insertOrTouchInternalCache(CacheManager cacheManager, OffHeapEntryHolder entry)
public void unLoadFullEntryIfPossible(CacheManager cacheManager, Context context)
unLoadFullEntryIfPossible
in interface IOffHeapRefCacheInfo
public void unLoadFullEntryIfPossible(CacheManager cacheManager, Context context, InternalCacheControl internalCacheControl)
unLoadFullEntryIfPossible
in interface IOffHeapRefCacheInfo
public void flush(CacheManager cacheManager, Context context)
flush
in interface IOffHeapRefCacheInfo
public Serializable getStorageKey()
getStorageKey
in interface IOffHeapRefCacheInfo
public Serializable getEntryLayout(CacheManager cacheManager)
getEntryLayout
in interface IOffHeapRefCacheInfo
public void setOffHeapPosition(Object pos)
setOffHeapPosition
in interface IOffHeapRefCacheInfo
public IEntryHolder getEntryHolderIfInMemory()
getEntryHolderIfInMemory
in interface IOffHeapRefCacheInfo
public void bulkRegister(Context context, BlobStoreBulkInfo bulkInfo, int spaceOperation, boolean registerDirectPersistency)
bulkRegister
in interface IOffHeapRefCacheInfo
public void bulkUnRegister(CacheManager cacheManager)
bulkUnRegister
in interface IOffHeapRefCacheInfo
public boolean isInBulk()
isInBulk
in interface IOffHeapRefCacheInfo
public IEntryHolder getEntryHolder()
public IEntryHolder getEntryHolder(CacheManager cacheManager)
getEntryHolder
in interface IEntryCacheInfo
public IEntryHolder getEntryHolder(CacheManager cacheManager, Context context)
getEntryHolder
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 isOffHeapEntry()
isOffHeapEntry
in interface ILeasedEntryCacheInfo
public Object getObjectStoredInLeaseManager()
getObjectStoredInLeaseManager
in interface ILeasedEntryCacheInfo
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)
EvictableServerEntry
setEvictionPayLoad
in interface EvictableServerEntry
public Object getEvictionPayLoad()
EvictableServerEntry
getEvictionPayLoad
in interface EvictableServerEntry
public String getUID()
EvictableServerEntry
getUID
in interface EvictableServerEntry
public void setInCache(boolean checkPendingPin)
setInCache
in interface IEntryCacheInfo
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 isDeleted()
isDeleted
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(Logger logger, String msg)
IStoredList
dump
in interface IStoredList<IEntryCacheInfo>
logger
- logger to usemsg
- message to add in logpublic int size()
ICollection
size
in interface ICollection<IEntryCacheInfo>
ICollection.isEmpty()
public 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 String getAlreadyMatchedIndexPath()
getAlreadyMatchedIndexPath
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()
public boolean isLockSubject()
ILockObject
isLockSubject
in interface ILockObject
public boolean preMatch(Context context, ITemplateHolder template)
preMatch
in interface IEntryCacheInfo
Copyright © GigaSpaces.