public class IgniteCacheDatabaseSharedManager extends GridCacheSharedManagerAdapter implements IgniteChangeGlobalStateSupport, CheckpointLockStateChecker
| Modifier and Type | Field and Description |
|---|---|
protected MemoryPolicy |
dfltMemPlc |
protected Map<String,MemoryMetrics> |
memMetricsMap |
protected Map<String,MemoryPolicy> |
memPlcMap |
cctx, diagnosticLog, log| Constructor and Description |
|---|
IgniteCacheDatabaseSharedManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
beforeExchange(GridDhtPartitionsExchangeFuture discoEvt) |
protected File |
buildAllocPath(MemoryPolicyConfiguration plc)
Builds allocation path for memory mapped file to be used with PageMemory.
|
protected File |
buildPath(String path,
String consId) |
boolean |
checkpointLockIsHeldByThread() |
void |
checkpointReadLock()
No-op for non-persistent storage.
|
void |
checkpointReadUnlock()
No-op for non-persistent storage.
|
protected void |
checkPolicyEvictionProperties(MemoryPolicyConfiguration plcCfg,
MemoryConfiguration dbCfg) |
protected PageMemory |
createPageMemory(DirectMemoryProvider memProvider,
MemoryConfiguration memCfg,
MemoryPolicyConfiguration memPlcCfg,
MemoryMetricsImpl memMetrics)
Creates PageMemory with given size and memory provider.
|
void |
dumpStatistics(IgniteLogger log) |
void |
ensureFreeSpace(MemoryPolicy memPlc)
|
FreeList |
freeList(String memPlcName) |
IgniteInternalFuture |
indexRebuildFuture(int cacheId) |
protected void |
initPageMemoryDataStructures(MemoryConfiguration dbCfg) |
protected void |
initPageMemoryPolicies(MemoryConfiguration memCfg) |
void |
lock() |
Collection<MemoryMetrics> |
memoryMetrics() |
MemoryMetrics |
memoryMetrics(String memPlcName) |
Collection<MemoryPolicy> |
memoryPolicies() |
MemoryPolicy |
memoryPolicy(String memPlcName) |
void |
onActivate(GridKernalContext kctx)
Called when cluster performing activation.
|
void |
onCacheGroupsStopped(Collection<IgniteBiTuple<CacheGroupContext,Boolean>> stoppedGrps) |
void |
onDeActivate(GridKernalContext kctx)
Called when cluster performing deactivation.
|
int |
pageSize() |
boolean |
persistenceEnabled() |
PersistenceMetrics |
persistentStoreMetrics() |
void |
prepareCachesStop()
Needed action before any cache will stop
|
void |
readCheckpointAndRestoreMemory(List<DynamicCacheDescriptor> cachesToStart) |
void |
releaseHistoryForExchange()
Release reserved update history.
|
void |
releaseHistoryForPreloading()
Release reserved update history.
|
Map<Integer,Map<Integer,Long>> |
reserveHistoryForExchange()
Reserve update history for exchange.
|
boolean |
reserveHistoryForPreloading(int grpId,
int partId,
long cntr)
Reserve update history for preloading.
|
ReuseList |
reuseList(String memPlcName) |
protected void |
setPageSize(int pageSize)
Method for fake (standalone) context initialization.
|
protected void |
start0() |
protected void |
stop0(boolean cancel) |
String |
systemMemoryPolicyName() |
void |
unLock() |
void |
waitForCheckpoint(String reason)
Waits until current state is checkpointed.
|
IgniteInternalFuture |
wakeupForCheckpoint(String reason) |
context, isStopping, kernalStartInfo, kernalStopInfo, log, onDisconnected, onKernalStop, onKernalStop0, printMemoryStats, start, startInfo, stop, stopInfo, toStringprotected Map<String,MemoryPolicy> memPlcMap
protected Map<String,MemoryMetrics> memMetricsMap
protected MemoryPolicy dfltMemPlc
protected void start0()
throws IgniteCheckedException
start0 in class GridCacheSharedManagerAdapterIgniteCheckedException - If failed.protected void initPageMemoryDataStructures(MemoryConfiguration dbCfg) throws IgniteCheckedException
dbCfg - Database config.IgniteCheckedException - If failed.public int pageSize()
protected void initPageMemoryPolicies(MemoryConfiguration memCfg)
memCfg - Database config.protected void checkPolicyEvictionProperties(MemoryPolicyConfiguration plcCfg, MemoryConfiguration dbCfg) throws IgniteCheckedException
plcCfg - MemoryPolicyConfiguration to validate.dbCfg - Memory configuration.IgniteCheckedException - If config is invalid.public void dumpStatistics(IgniteLogger log)
log - Logger.public Collection<MemoryPolicy> memoryPolicies()
policies.public Collection<MemoryMetrics> memoryMetrics()
public PersistenceMetrics persistentStoreMetrics()
null otherwise.public void readCheckpointAndRestoreMemory(List<DynamicCacheDescriptor> cachesToStart) throws IgniteCheckedException
cachesToStart - Started caches.IgniteCheckedException - If failed.@Nullable public MemoryMetrics memoryMetrics(String memPlcName)
memPlcName - Name of MemoryPolicy to obtain MemoryMetrics for.MemoryMetrics snapshot for specified MemoryPolicy or null if
no MemoryPolicy is configured for specified name.public MemoryPolicy memoryPolicy(String memPlcName) throws IgniteCheckedException
memPlcName - Memory policy name.MemoryPolicy instance associated with a given MemoryPolicyConfiguration.IgniteCheckedException - in case of request for unknown MemoryPolicy.public FreeList freeList(String memPlcName)
memPlcName - MemoryPolicyConfiguration name.FreeList instance associated with a given MemoryPolicyConfiguration.public ReuseList reuseList(String memPlcName)
memPlcName - MemoryPolicyConfiguration name.ReuseList instance associated with a given MemoryPolicyConfiguration.protected void stop0(boolean cancel)
stop0 in class GridCacheSharedManagerAdaptercancel - Cancel flag.public boolean persistenceEnabled()
public boolean checkpointLockIsHeldByThread()
checkpointLockIsHeldByThread in interface CheckpointLockStateCheckerpublic void lock()
throws IgniteCheckedException
IgniteCheckedExceptionpublic void unLock()
public void checkpointReadLock()
public void checkpointReadUnlock()
@Nullable public IgniteInternalFuture wakeupForCheckpoint(String reason)
public void waitForCheckpoint(String reason) throws IgniteCheckedException
IgniteCheckedException - If failed.public void beforeExchange(GridDhtPartitionsExchangeFuture discoEvt) throws IgniteCheckedException
discoEvt - Before exchange for the given discovery event.IgniteCheckedExceptionpublic void prepareCachesStop()
public void onCacheGroupsStopped(Collection<IgniteBiTuple<CacheGroupContext,Boolean>> stoppedGrps)
stoppedGrps - A collection of tuples (cache group, destroy flag).@Nullable public IgniteInternalFuture indexRebuildFuture(int cacheId)
public Map<Integer,Map<Integer,Long>> reserveHistoryForExchange()
public void releaseHistoryForExchange()
public boolean reserveHistoryForPreloading(int grpId,
int partId,
long cntr)
grpId - Cache group ID.partId - Partition Id.cntr - Update counter.public void releaseHistoryForPreloading()
public void ensureFreeSpace(MemoryPolicy memPlc) throws IgniteCheckedException
memPlc - Memory policy.IgniteCheckedException@Nullable protected File buildAllocPath(MemoryPolicyConfiguration plc)
plc - MemoryPolicyConfiguration.protected PageMemory createPageMemory(DirectMemoryProvider memProvider, MemoryConfiguration memCfg, MemoryPolicyConfiguration memPlcCfg, MemoryMetricsImpl memMetrics)
memProvider - Memory provider.memCfg - Memory configuartion.memPlcCfg - Memory policy configuration.memMetrics - MemoryMetrics to collect memory usage metrics.protected File buildPath(String path, String consId)
path - Path to the working directory.consId - Consistent ID of the local node.public void onActivate(GridKernalContext kctx) throws IgniteCheckedException
onActivate in interface IgniteChangeGlobalStateSupportkctx - Kernal context.IgniteCheckedException - If failed.public void onDeActivate(GridKernalContext kctx)
onDeActivate in interface IgniteChangeGlobalStateSupportkctx - Kernal context.public String systemMemoryPolicyName()
protected void setPageSize(int pageSize)
pageSize - configured page size
Follow @ApacheIgnite
Ignite Fabric : ver. 2.2.0 Release Date : September 15 2017