public class CacheManager extends AbstractCacheManager implements SpaceEvictionManager
Modifier and Type | Class and Description |
---|---|
static class |
CacheManager.InitialLoadOrigin
INITIALLOAD INFO.
|
static class |
CacheManager.RecentDeleteCodes
usage of recent deletes.
|
Modifier and Type | Field and Description |
---|---|
TerminatingFifoXtnsInfo |
_terminatingXtnsInfo |
static int |
MIN_SIZE_TO_CONSIDER_COMPOUND_INDICES |
static int |
MIN_SIZE_TO_PERFORM_EXPLICIT_PROPERTIES_INDEX_SCAN_ |
_evictionQuota, m_CacheSize
Constructor and Description |
---|
CacheManager(SpaceConfigReader configReader,
ClusterPolicy clusterPolicy,
SpaceTypeManager typeManager,
IReplicationNode replicationNode,
IStorageAdapter sa,
SpaceEngine engine,
Properties customProperties) |
Modifier and Type | Method and Description |
---|---|
void |
addToEvictionStrategy(EvictableServerEntry entry,
boolean isNew) |
IEntryHolder |
associateEntryWithXtn(Context context,
IEntryHolder entryHolder,
ITemplateHolder template,
XtnEntry xtnEntry,
IEntryHolder new_content)
tie an entry with a transaction.
|
void |
closeQueryExtensionManagers() |
void |
commit(Context context,
XtnEntry xtnEntry,
boolean singleParticipant,
boolean anyUpdates,
boolean supportsTwoPhaseReplication) |
int |
count(Context context,
ITemplateHolder template,
XtnEntry xtnFilter) |
void |
disconnectEntryFromXtn(Context context,
IEntryHolder entryHolder,
XtnEntry xtnEntry,
boolean xtnEnd)
disconnect an entry from xtn
|
int |
evictBatch(int evictionQuota)
evict a quota of entries from cache.
|
void |
extendLeasePeriod(Context context,
long time,
long original_time,
String uid,
String classname,
int objectType,
boolean shouldReplicate,
boolean origin) |
Object |
findTemplatesByIndex(Context context,
IServerTypeDesc typeDesc,
IEntryHolder entry,
MatchTarget matchTarget)
given a class name return the SL of matching templates.
|
Context |
freeCacheContext(Context context) |
BlobStoreMemoryMonitor |
getBlobStoreMemoryMonitor() |
IStorageConsistency |
getBlobStoreRecoveryHelper() |
BlobStoreExtendedStorageHandler |
getBlobStoreStorageHandler() |
Context |
getCacheContext() |
static Logger |
getCacheLogger() |
String |
getConfigInfo() |
SpaceEngine |
getEngine() |
int |
getEnriesSize() |
IEntryCacheInfo[] |
getEntriesByUniqueIds(IServerTypeDesc currServerTypeDesc,
Object[] ids,
ITemplateHolder template) |
IStoredList<IEntryCacheInfo> |
getEntriesMinIndex(Context context,
TypeData typeData,
int numOfFields,
ITemplateHolder template)
Computes the best way to reach a list of potential match of entries of the specified type.
|
Object |
getEntriesMinIndexExtended(Context context,
TypeData entryType,
int numOfFields,
ITemplateHolder template)
Using extended match-
Computes the best way to reach a list of potential match of entries of the specified type.
|
IEntryHolder |
getEntry(Context context,
IEntryHolder entryHolder,
boolean tryInsertToCache,
boolean lockedEntry) |
IEntryHolder |
getEntry(Context context,
IEntryHolder entryHolder,
boolean tryInsertToCache,
boolean lockedEntry,
boolean useOnlyCache) |
IEntryHolder |
getEntry(Context context,
String uid,
String inputClassName,
IEntryHolder template,
boolean tryInsertToCache,
boolean lockedEntry,
boolean useOnlyCache)
get entry by its uid, and, optionally, by its template className is passed if known, can be
null template is not null if isCacheExternalDB is true: external DB, the template must
contain the PK fields insertToCache- true if entry shouldbe inserted to cache
|
IEntryHolder |
getEntryByIdFromPureCache(Object id,
IServerTypeDesc typeDesc) |
IEntryHolder |
getEntryByUidFromPureCache(String uid) |
IEntryCacheInfo |
getEntryByUniqueId(IServerTypeDesc currServerTypeDesc,
Object templateValue,
ITemplateHolder template) |
IEntryCacheInfo |
getEntryCacheInfo(IEntryHolder eh)
get PEntry for entry.
|
IEntryHolder |
getEntryFromCacheHolder(IEntryCacheInfo pt)
given a PEntry, return the entry.
|
String |
getEvictionPolicyReplicationMembersGroupName() |
IEvictionReplicationsMarkersRepository |
getEvictionReplicationsMarkersRepository() |
FifoBackgroundDispatcher |
getFifoBackgroundDispatcher() |
TerminatingFifoXtnsInfo.FifoXtnEntryInfo |
getFifoEntryXtnInfo(IEntryHolder eh) |
FifoGroupCacheImpl |
getFifoGroupCacheImpl() |
long |
getFifoXtnNumber(XtnEntry xtnEntry)
get the fifo xtn number of a xtn
|
long |
getLatestTTransactionTerminationNum()
get the Terminating fifo transaction
|
LeaseManager |
getLeaseManager() |
Map<String,LocalCacheDetails> |
getLocalCaches() |
IBasicLockManager<IEntryHolder> |
getLockManager()
get the lock manager
|
static Logger |
getLogger() |
IScanListIterator<IEntryCacheInfo> |
getMatchingMemoryEntriesForScanning(Context context,
IServerTypeDesc currServerTypeDesc,
ITemplateHolder template,
IServerTypeDesc serverTypeDesc) |
int |
getMinExtendedIndexActivationSize() |
int |
getNumberOfEntries() |
int |
getNumberOfEntries(String typeName,
boolean includeSubtypes) |
int |
getNumberOfLockedObjectsUnderTxn(XtnEntry xtnEntry)
used by getTransactionsInfo to retrieve number of Locked Objects
|
int |
getNumberOfNotifyTemplates() |
int |
getNumberOfNotifyTemplates(String typeName,
boolean includeSubtypes) |
int |
getNumOfRecentDeletes() |
int |
getNumOfRecentUpdates() |
IOffHeapInternalCache |
getOffHeapInternalCache() |
IEntryCacheInfo |
getPEntryByUid(String uid) |
QueryExtensionIndexManagerWrapper |
getQueryExtensionManager(String namespace) |
RecentDeletesRepository.RecentDeleteInfo |
getRecentDeleteInfo(String uid) |
Iterator<RecentDeletesRepository.RecentDeleteInfo> |
getRecentDeletesIterator() |
RecentUpdatesRepository.RecentUpdateInfo |
getRecentUpdateInfo(String uid) |
Iterator<RecentUpdatesRepository.RecentUpdateInfo> |
getRecentUpdatesIterator() |
IReplicationOutContext |
getReplicationContext(Context context) |
SpaceRuntimeInfo |
getRuntimeInfo(String typeName) |
SQLFunctions |
getSqlFunctions() |
IStorageAdapter |
getStorageAdapter() |
ITemplateHolder |
getTemplate(String uid) |
TemplateCacheInfo |
getTemplateCacheInfo(ITemplateHolder th)
get PEntry for entry.
|
TemplateExpirationManager |
getTemplateExpirationManager() |
List<TemplateInfo> |
getTemplatesInfo(String className)
returns a list of all the pending templates for the given class
|
TemplatesManager |
getTemplatesManager() |
ConcurrentHashMap<TerminatingFifoXtnsInfo.FifoXtnEntryInfo,TerminatingFifoXtnsInfo.FifoXtnEntryInfo> |
getTerminatingXtnsEntries() |
TypeData |
getTypeData(IServerTypeDesc typeDesc) |
TypeDataFactory |
getTypeDataFactory() |
SpaceTypeManager |
getTypeManager() |
void |
handleFifoGroupsCacheOnXtnEnd(Context context,
XtnEntry xtnEntry) |
void |
handleInsertEntryReplication(Context context,
IEntryHolder entryHolder) |
void |
handleInsertEntryReplication(Context context,
IEntryHolder entryHolder,
int blobstoreBulkId) |
void |
handleRemoveEntryReplication(Context context,
IEntryHolder entryHolder,
SpaceEngine.EntryRemoveReasonCodes removeReason) |
void |
handleRemoveEntryReplication(Context context,
IEntryHolder entryHolder,
SpaceEngine.EntryRemoveReasonCodes removeReason,
int blobstoreBulkId) |
void |
handleUnderXtnUpdate(Context context,
ServerTransaction xtn,
IEntryHolder eh,
boolean isCommitting,
XtnData pXtn)
xtn terminating-handle under xtn updates.
|
void |
handleUpdateEntryReplication(Context context,
IEntryHolder new_eh,
IEntryData originalData,
Collection<SpaceEntryMutator> mutators) |
void |
handleUpdateEntryReplication(Context context,
IEntryHolder new_eh,
IEntryData originalData,
Collection<SpaceEntryMutator> mutators,
int blobstoreBulkId) |
void |
init(Properties properties) |
void |
initCache(boolean loadDataFromDB,
Properties properties)
Init.
|
boolean |
initiatedEviction(Context context,
IEntryHolder entry,
boolean shouldReplicate) |
void |
insertEntry(Context context,
IEntryHolder entryHolder,
boolean shouldReplicate,
boolean origin,
boolean suppliedUid)
insert an entry to the space.
|
void |
insertEntryReferences(Context context,
IEntryCacheInfo pEntry,
TypeData pType,
boolean applySequenceNumber)
Inserts the refs to cache.
|
void |
insertTemplate(Context context,
ITemplateHolder templateHolder,
boolean shouldReplicate)
insert a template to the cache and DB.
|
void |
insertToRecentDeletes(IEntryHolder entry,
long duration,
ServerTransaction committingXtn) |
void |
insertToRecentUpdates(IEntryHolder entry,
long duration,
ServerTransaction committingXtn) |
void |
insertToRecentUpdatesIfNeeded(IEntryHolder entry,
long duration,
ServerTransaction committingXtn) |
boolean |
isCacheExternalDB()
Returns an indication if Storage Adapter acts as an external data-source.
|
boolean |
isCentralDB()
returns an indication if the underlying DB is a central DB common to several cluster members
|
boolean |
isClusteredExternalDBEnabled()
Returns an indication if Storage Adapter acts as an external clustered data-source.
|
boolean |
isDirectPersistencyEmbeddedtHandlerUsed() |
boolean |
isDummyEntry(IEntryHolder eh) |
boolean |
isEmptyAfterInitialLoadStage() |
boolean |
isEntryInPureCache(String uid) |
boolean |
isEntryInRecentUpdates(IEntryHolder entry) |
boolean |
isFromFifoClass(IServerTypeDesc typeDesc) |
boolean |
isMemorySpace()
is this space a memory space ?
|
boolean |
isOffHeapDataSpace() |
boolean |
isPersistentBlobStore() |
boolean |
isResidentCacheEntry(EvictableServerEntry entry) |
boolean |
isSyncHybrid() |
boolean |
isTimeBasedEvictionStrategy() |
boolean |
isVersionedExternalDB()
returns an indication if the underlying data-source supports versioning.
|
void |
lockEntry(XtnData xtn,
IEntryCacheInfo pEntry,
OperationID operationID) |
IEntryHolder |
makeChangeOpEntry(Context context,
ITemplateHolder template,
IEntryHolder currentEntry) |
ISAdapterIterator<IEntryHolder> |
makeEntriesIter(Context context,
ITemplateHolder template,
IServerTypeDesc serverTypeDesc,
long SCNFilter,
long leaseFilter,
boolean memoryOnly) |
ISAdapterIterator<IEntryHolder> |
makeEntriesIter(Context context,
ITemplateHolder template,
IServerTypeDesc serverTypeDesc,
long SCNFilter,
long leaseFilter,
boolean memoryOnly,
boolean transientOnly) |
IScanListIterator |
makeScanableEntriesIter(Context context,
ITemplateHolder template,
IServerTypeDesc serverTypeDesc,
long SCNFilter,
long leaseFilter,
boolean memoryOnly) |
ISAdapterIterator |
makeUnderXtnEntriesIter(Context context,
XtnEntry xtnEntry,
int selectType) |
ISAdapterIterator |
makeUnderXtnEntriesIter(Context context,
XtnEntry xtnEntry,
int selectType,
boolean returnPentries) |
ISAdapterIterator<ITemplateHolder> |
makeUnderXtnTemplatesIter(Context context,
XtnEntry xtnEntry) |
void |
makeWaitForInfo(Context context,
IEntryHolder entryHolder,
ITemplateHolder templateHolder) |
boolean |
mayNeedEntriesUnpinning() |
boolean |
needReReadAfterEntryLock() |
boolean |
optimizedBlobStoreClear() |
void |
preCommit(Context context,
XtnEntry xtnEntry,
boolean supportsTwoPhaseReplication) |
void |
prepare(Context context,
XtnEntry xtnEntry,
boolean supportsTwoPhaseReplication,
boolean handleReplication,
boolean handleSA) |
void |
prePrepare(XtnEntry xtnEntry)
this method is called by the engine in order to make a "snapshot" of entries needed for
notify.
|
int |
removeEntry(Context context,
IEntryHolder entryHolder,
IEntryCacheInfo pEntry,
boolean shouldReplicate,
boolean origin,
SpaceEngine.EntryRemoveReasonCodes removeReason,
boolean disableSAcall)
remove entry from cache & SA
|
boolean |
removeEntryFromCache(IEntryHolder entryHolder)
Removes the specified entry from cache.
|
boolean |
removeEntryFromCache(IEntryHolder entryHolder,
boolean initiatedByEvictionStrategy,
boolean locked,
IEntryCacheInfo pEntry,
CacheManager.RecentDeleteCodes recentDeleteUsage)
Removes the specified entry from cache.
|
void |
removeEntryReferences(IEntryCacheInfo pEntry,
TypeData pType,
int numOfIndexesInsertedOnError)
Removes entry refs from cache.
|
void |
removeFifoXtnInfoForEntry(IEntryHolder eh)
remove fifo xtn info for entry MUST be called when entry is locked
|
void |
removeFromEvictionStrategy(EvictableServerEntry entry) |
boolean |
removeFromRecentDeletes(IEntryHolder entry) |
boolean |
removeFromRecentUpdatesIfNeeded(IEntryHolder entry) |
void |
removeLockedEntry(XtnData xtn,
IEntryCacheInfo pEntry) |
void |
removeTemplate(Context context,
ITemplateHolder template,
boolean fromReplication,
boolean origin,
boolean dontReplicate)
Marks template as DELETED and send a BUS Packet to the GC.
|
void |
removeTemplate(Context context,
ITemplateHolder template,
boolean fromReplication,
boolean origin,
boolean dontReplicate,
SpaceEngine.TemplateRemoveReasonCodes removeReason)
Marks template as DELETED and send a BUS Packet to the GC.
|
void |
removeWaitingForInfo(Context context,
IEntryHolder entryHolder,
ITemplateHolder templateHolder,
boolean unpinIfPossible) |
boolean |
requiresEvictionReplicationProtection() |
void |
rollback(Context context,
XtnEntry xtnEntry,
boolean alreadyPrepared,
boolean anyUpdates,
boolean supportsTwoPhaseReplication) |
IEntryCacheInfo |
safeInsertEntryToCache(Context context,
IEntryHolder entryHolder,
boolean newEntry,
TypeData pType,
boolean pin,
CacheManager.InitialLoadOrigin fromInitialLoad)
Inserts the specified entry to cache, perform memory manager check.
|
void |
setFifoCreationXtnInfoForEntry(IEntryHolder eh,
long xtnNumber)
create fifo xtn info for entry MUST be called when entry is locked
|
void |
setFifoXtnNumber(XtnEntry xtnEntry,
long fifoXtnNumber)
set the fifo xtn number of a xtn
|
void |
setLatestTransactionTerminationNum(long xtnTerminationNum)
get the Terminating fifo transaction //NOTE- must be called when xtns are locked !!!!!!!!
|
void |
setLeaseManager(LeaseManager leaseManager) |
void |
shutDown()
shut down cache manager.
|
void |
startTemplateExpirationManager() |
boolean |
testAndSetFGCacheForEntry(Context context,
IEntryHolder entry,
ITemplateHolder template,
boolean testOnly,
IServerTypeDesc tte) |
void |
touchByEntry(IEntryHolder entry,
boolean modifyOp) |
boolean |
tryEvict(EvictableServerEntry entry)
get permission to evict an entry, and if granted remove the entry from cache.
|
boolean |
unpinIfNeeded(Context context,
IEntryHolder entry,
ITemplateHolder template,
IEntryCacheInfo pEntry)
if relevant-unpin the entry method is called after each operation or xtn termination entry
should be locked when method is called
|
IEntryHolder |
updateEntry(Context context,
IEntryHolder entry,
ITemplateHolder template,
boolean shouldReplicate,
boolean origin)
update entry- if the entry should be updated under a xtn - insert to xtn lists.
|
void |
updateFifoXtnInfoForEntry(IEntryHolder eh,
long xtnNumber,
boolean writeLock,
boolean entryWritingXtn)
update fifo xtn info for entry MUST be called when entry is locked update write lock if
writeLock is true, else update read lock entryWritingXtn = true if this is the commit of the
entry write
|
void |
updateLock(XtnData xtn,
IEntryCacheInfo pEntry,
OperationID operationID,
int templateOperation) |
boolean |
useBlobStoreBulks() |
boolean |
useBlobStorePreFetch() |
boolean |
useBlobStoreReplicationBackupBulks() |
boolean |
useRecentDeletes()
returns true if recentDeletes hash in engine need to be used.
|
boolean |
useRecentUpdatesForPinning()
returns true if recentUpdates hash in engine need to be used.
|
Context |
viewCacheContext() |
getCachePolicy, getMaxCacheSize, isAllInCachePolicy, isEvictableCachePolicy, isOffHeapCachePolicy, isPluggedEvictionPolicy, isResidentEntriesCachePolicy, setCachePolicy, setEvictionQuota
public final TerminatingFifoXtnsInfo _terminatingXtnsInfo
public static final int MIN_SIZE_TO_PERFORM_EXPLICIT_PROPERTIES_INDEX_SCAN_
public static final int MIN_SIZE_TO_CONSIDER_COMPOUND_INDICES
public CacheManager(SpaceConfigReader configReader, ClusterPolicy clusterPolicy, SpaceTypeManager typeManager, IReplicationNode replicationNode, IStorageAdapter sa, SpaceEngine engine, Properties customProperties) throws CreateException
CreateException
public boolean isSyncHybrid()
public static Logger getLogger()
public void setLeaseManager(LeaseManager leaseManager)
public void init(Properties properties) throws SAException, CreateException
SAException
CreateException
public boolean isTimeBasedEvictionStrategy()
public boolean requiresEvictionReplicationProtection()
public IEvictionReplicationsMarkersRepository getEvictionReplicationsMarkersRepository()
public void initCache(boolean loadDataFromDB, Properties properties) throws SAException
SAException
public boolean isCacheExternalDB()
true
if Storage Adapter is an external data-source; false
otherwise.public SpaceEngine getEngine()
public SpaceTypeManager getTypeManager()
public LeaseManager getLeaseManager()
public boolean isOffHeapDataSpace()
public BlobStoreExtendedStorageHandler getBlobStoreStorageHandler()
public BlobStoreMemoryMonitor getBlobStoreMemoryMonitor()
public IStorageConsistency getBlobStoreRecoveryHelper()
public boolean useBlobStoreBulks()
public boolean useBlobStoreReplicationBackupBulks()
public boolean useBlobStorePreFetch()
public boolean isPersistentBlobStore()
public boolean optimizedBlobStoreClear()
public boolean needReReadAfterEntryLock()
public boolean mayNeedEntriesUnpinning()
public boolean isClusteredExternalDBEnabled()
true
if either indicated by a cluster-wide property or by enabling the mirror
service in the cluster.true
if Storage Adapter is an external clustered data-source;
false
otherwise.public boolean isCentralDB()
true
if the underlying DB is cental; false
otherwise.public boolean isVersionedExternalDB()
true
if the underlying DB supports versioning; false
otherwise.public boolean isEmptyAfterInitialLoadStage()
public boolean isDirectPersistencyEmbeddedtHandlerUsed()
public IBasicLockManager<IEntryHolder> getLockManager()
public void touchByEntry(IEntryHolder entry, boolean modifyOp)
public IOffHeapInternalCache getOffHeapInternalCache()
public String getConfigInfo()
public void shutDown()
public boolean useRecentDeletes()
public void insertToRecentDeletes(IEntryHolder entry, long duration, ServerTransaction committingXtn)
public boolean removeFromRecentDeletes(IEntryHolder entry)
public Iterator<RecentDeletesRepository.RecentDeleteInfo> getRecentDeletesIterator()
public RecentDeletesRepository.RecentDeleteInfo getRecentDeleteInfo(String uid)
public int getNumOfRecentDeletes()
public boolean useRecentUpdatesForPinning()
public void insertToRecentUpdates(IEntryHolder entry, long duration, ServerTransaction committingXtn)
public void insertToRecentUpdatesIfNeeded(IEntryHolder entry, long duration, ServerTransaction committingXtn)
public boolean removeFromRecentUpdatesIfNeeded(IEntryHolder entry)
public Iterator<RecentUpdatesRepository.RecentUpdateInfo> getRecentUpdatesIterator()
public RecentUpdatesRepository.RecentUpdateInfo getRecentUpdateInfo(String uid)
public int getNumOfRecentUpdates()
public boolean isEntryInRecentUpdates(IEntryHolder entry)
public boolean isDummyEntry(IEntryHolder eh)
public int evictBatch(int evictionQuota)
evictBatch
in class AbstractCacheManager
public void insertEntry(Context context, IEntryHolder entryHolder, boolean shouldReplicate, boolean origin, boolean suppliedUid) throws SAException, EntryAlreadyInSpaceException
public void handleInsertEntryReplication(Context context, IEntryHolder entryHolder) throws SAException
SAException
public void handleInsertEntryReplication(Context context, IEntryHolder entryHolder, int blobstoreBulkId) throws SAException
SAException
public String getEvictionPolicyReplicationMembersGroupName()
public IEntryHolder updateEntry(Context context, IEntryHolder entry, ITemplateHolder template, boolean shouldReplicate, boolean origin) throws SAException
SAException
public void handleUpdateEntryReplication(Context context, IEntryHolder new_eh, IEntryData originalData, Collection<SpaceEntryMutator> mutators)
public void handleUpdateEntryReplication(Context context, IEntryHolder new_eh, IEntryData originalData, Collection<SpaceEntryMutator> mutators, int blobstoreBulkId)
public IEntryHolder makeChangeOpEntry(Context context, ITemplateHolder template, IEntryHolder currentEntry)
public void insertTemplate(Context context, ITemplateHolder templateHolder, boolean shouldReplicate)
public IEntryHolder getEntry(Context context, IEntryHolder entryHolder, boolean tryInsertToCache, boolean lockedEntry, boolean useOnlyCache) throws SAException
lockedEntry
- - true if the entry is locked by the callerSAException
public IEntryHolder getEntry(Context context, IEntryHolder entryHolder, boolean tryInsertToCache, boolean lockedEntry) throws SAException
SAException
public IEntryHolder getEntry(Context context, String uid, String inputClassName, IEntryHolder template, boolean tryInsertToCache, boolean lockedEntry, boolean useOnlyCache) throws SAException
SAException
public List<TemplateInfo> getTemplatesInfo(String className)
public ITemplateHolder getTemplate(String uid)
public IScanListIterator<IEntryCacheInfo> getMatchingMemoryEntriesForScanning(Context context, IServerTypeDesc currServerTypeDesc, ITemplateHolder template, IServerTypeDesc serverTypeDesc)
public int removeEntry(Context context, IEntryHolder entryHolder, IEntryCacheInfo pEntry, boolean shouldReplicate, boolean origin, SpaceEngine.EntryRemoveReasonCodes removeReason, boolean disableSAcall) throws SAException
disableSAcall
- - if true don't call the underlying SASAException
public void handleRemoveEntryReplication(Context context, IEntryHolder entryHolder, SpaceEngine.EntryRemoveReasonCodes removeReason)
public void handleRemoveEntryReplication(Context context, IEntryHolder entryHolder, SpaceEngine.EntryRemoveReasonCodes removeReason, int blobstoreBulkId)
public void removeTemplate(Context context, ITemplateHolder template, boolean fromReplication, boolean origin, boolean dontReplicate)
public void removeTemplate(Context context, ITemplateHolder template, boolean fromReplication, boolean origin, boolean dontReplicate, SpaceEngine.TemplateRemoveReasonCodes removeReason)
public FifoBackgroundDispatcher getFifoBackgroundDispatcher()
public void makeWaitForInfo(Context context, IEntryHolder entryHolder, ITemplateHolder templateHolder) throws SAException
SAException
public void removeWaitingForInfo(Context context, IEntryHolder entryHolder, ITemplateHolder templateHolder, boolean unpinIfPossible)
public IEntryHolder associateEntryWithXtn(Context context, IEntryHolder entryHolder, ITemplateHolder template, XtnEntry xtnEntry, IEntryHolder new_content) throws SAException
SAException
public IEntryCacheInfo getPEntryByUid(String uid)
public IEntryHolder getEntryByUidFromPureCache(String uid)
public boolean isEntryInPureCache(String uid)
uid
- of entry to checktrue
if this entry is in pure cache; false
otherwise.public void disconnectEntryFromXtn(Context context, IEntryHolder entryHolder, XtnEntry xtnEntry, boolean xtnEnd) throws SAException
entryHolder
- - entry to disconnectxtnEnd
- - true if its part of commit/rb processSAException
public void prepare(Context context, XtnEntry xtnEntry, boolean supportsTwoPhaseReplication, boolean handleReplication, boolean handleSA) throws SAException
SAException
public void prePrepare(XtnEntry xtnEntry)
public void handleUnderXtnUpdate(Context context, ServerTransaction xtn, IEntryHolder eh, boolean isCommitting, XtnData pXtn)
public void preCommit(Context context, XtnEntry xtnEntry, boolean supportsTwoPhaseReplication)
public void commit(Context context, XtnEntry xtnEntry, boolean singleParticipant, boolean anyUpdates, boolean supportsTwoPhaseReplication) throws SAException
SAException
public void rollback(Context context, XtnEntry xtnEntry, boolean alreadyPrepared, boolean anyUpdates, boolean supportsTwoPhaseReplication) throws SAException
SAException
public void extendLeasePeriod(Context context, long time, long original_time, String uid, String classname, int objectType, boolean shouldReplicate, boolean origin)
public Object findTemplatesByIndex(Context context, IServerTypeDesc typeDesc, IEntryHolder entry, MatchTarget matchTarget)
public IEntryHolder getEntryFromCacheHolder(IEntryCacheInfo pt)
public IEntryCacheInfo getEntryCacheInfo(IEntryHolder eh)
public TemplateCacheInfo getTemplateCacheInfo(ITemplateHolder th)
public ISAdapterIterator<IEntryHolder> makeEntriesIter(Context context, ITemplateHolder template, IServerTypeDesc serverTypeDesc, long SCNFilter, long leaseFilter, boolean memoryOnly, boolean transientOnly) throws SAException
SAException
public ISAdapterIterator<IEntryHolder> makeEntriesIter(Context context, ITemplateHolder template, IServerTypeDesc serverTypeDesc, long SCNFilter, long leaseFilter, boolean memoryOnly) throws SAException
SAException
public IScanListIterator makeScanableEntriesIter(Context context, ITemplateHolder template, IServerTypeDesc serverTypeDesc, long SCNFilter, long leaseFilter, boolean memoryOnly) throws SAException
SAException
public ISAdapterIterator<ITemplateHolder> makeUnderXtnTemplatesIter(Context context, XtnEntry xtnEntry) throws SAException
SAException
public ISAdapterIterator makeUnderXtnEntriesIter(Context context, XtnEntry xtnEntry, int selectType) throws SAException
SAException
public ISAdapterIterator makeUnderXtnEntriesIter(Context context, XtnEntry xtnEntry, int selectType, boolean returnPentries) throws SAException
SAException
public int count(Context context, ITemplateHolder template, XtnEntry xtnFilter) throws SAException
SAException
public TypeDataFactory getTypeDataFactory()
public TypeData getTypeData(IServerTypeDesc typeDesc)
public IEntryCacheInfo safeInsertEntryToCache(Context context, IEntryHolder entryHolder, boolean newEntry, TypeData pType, boolean pin, CacheManager.InitialLoadOrigin fromInitialLoad)
public void insertEntryReferences(Context context, IEntryCacheInfo pEntry, TypeData pType, boolean applySequenceNumber)
public boolean removeEntryFromCache(IEntryHolder entryHolder)
public boolean removeEntryFromCache(IEntryHolder entryHolder, boolean initiatedByEvictionStrategy, boolean locked, IEntryCacheInfo pEntry, CacheManager.RecentDeleteCodes recentDeleteUsage)
public SQLFunctions getSqlFunctions()
public void removeEntryReferences(IEntryCacheInfo pEntry, TypeData pType, int numOfIndexesInsertedOnError)
public IEntryCacheInfo getEntryByUniqueId(IServerTypeDesc currServerTypeDesc, Object templateValue, ITemplateHolder template)
public IEntryCacheInfo[] getEntriesByUniqueIds(IServerTypeDesc currServerTypeDesc, Object[] ids, ITemplateHolder template)
public IStoredList<IEntryCacheInfo> getEntriesMinIndex(Context context, TypeData typeData, int numOfFields, ITemplateHolder template)
typeData
- the type of entries to search fortemplate
- the template to match againstnull
if there are no matches.public Object getEntriesMinIndexExtended(Context context, TypeData entryType, int numOfFields, ITemplateHolder template)
entryType
- the type of entries to search fortemplate
- the template to match againstnull
if there
are no matches.public IEntryHolder getEntryByIdFromPureCache(Object id, IServerTypeDesc typeDesc)
public boolean tryEvict(EvictableServerEntry entry)
tryEvict
in interface SpaceEvictionManager
entry
- The entry to evict.public boolean unpinIfNeeded(Context context, IEntryHolder entry, ITemplateHolder template, IEntryCacheInfo pEntry)
public boolean initiatedEviction(Context context, IEntryHolder entry, boolean shouldReplicate) throws SAException
SAException
public boolean isMemorySpace()
public boolean isResidentCacheEntry(EvictableServerEntry entry)
public IReplicationOutContext getReplicationContext(Context context)
public boolean isFromFifoClass(IServerTypeDesc typeDesc)
public TemplatesManager getTemplatesManager()
public int getNumberOfLockedObjectsUnderTxn(XtnEntry xtnEntry)
public int getMinExtendedIndexActivationSize()
public int getEnriesSize()
public long getLatestTTransactionTerminationNum()
public void setLatestTransactionTerminationNum(long xtnTerminationNum)
public void setFifoXtnNumber(XtnEntry xtnEntry, long fifoXtnNumber)
public long getFifoXtnNumber(XtnEntry xtnEntry)
public void updateFifoXtnInfoForEntry(IEntryHolder eh, long xtnNumber, boolean writeLock, boolean entryWritingXtn)
public void setFifoCreationXtnInfoForEntry(IEntryHolder eh, long xtnNumber)
xtnNumber
- - the xtn in the system when entry was createdpublic TerminatingFifoXtnsInfo.FifoXtnEntryInfo getFifoEntryXtnInfo(IEntryHolder eh)
public void removeFifoXtnInfoForEntry(IEntryHolder eh)
public ConcurrentHashMap<TerminatingFifoXtnsInfo.FifoXtnEntryInfo,TerminatingFifoXtnsInfo.FifoXtnEntryInfo> getTerminatingXtnsEntries()
public void lockEntry(XtnData xtn, IEntryCacheInfo pEntry, OperationID operationID)
public void updateLock(XtnData xtn, IEntryCacheInfo pEntry, OperationID operationID, int templateOperation)
public void removeLockedEntry(XtnData xtn, IEntryCacheInfo pEntry)
public IStorageAdapter getStorageAdapter()
public FifoGroupCacheImpl getFifoGroupCacheImpl()
public Context getCacheContext()
public Context viewCacheContext()
public void startTemplateExpirationManager()
public TemplateExpirationManager getTemplateExpirationManager()
public boolean testAndSetFGCacheForEntry(Context context, IEntryHolder entry, ITemplateHolder template, boolean testOnly, IServerTypeDesc tte)
public void handleFifoGroupsCacheOnXtnEnd(Context context, XtnEntry xtnEntry)
public void addToEvictionStrategy(EvictableServerEntry entry, boolean isNew)
public void removeFromEvictionStrategy(EvictableServerEntry entry)
public Map<String,LocalCacheDetails> getLocalCaches()
public static Logger getCacheLogger()
public int getNumberOfEntries()
public int getNumberOfEntries(String typeName, boolean includeSubtypes)
public int getNumberOfNotifyTemplates()
public int getNumberOfNotifyTemplates(String typeName, boolean includeSubtypes)
public SpaceRuntimeInfo getRuntimeInfo(String typeName)
public QueryExtensionIndexManagerWrapper getQueryExtensionManager(String namespace)
public void closeQueryExtensionManagers()
Copyright © GigaSpaces.