public class GridCacheProcessor extends GridProcessorAdapter
GridComponent.DiscoveryDataExchangeTypectx, diagnosticLog, log| Constructor and Description |
|---|
GridCacheProcessor(GridKernalContext ctx) |
| Modifier and Type | Method and Description |
|---|---|
void |
addCacheConfiguration(CacheConfiguration cacheCfg) |
@Nullable IgniteCacheProxyImpl<?,?> |
addjCacheProxy(String name,
IgniteCacheProxyImpl<?,?> proxy) |
void |
awaitStarted() |
void |
blockGateway(String cacheName,
boolean stop,
boolean restart) |
void |
blockGateways()
Blocks all available gateways
|
List<GridCacheAdapter> |
blockGateways(Collection<Integer> cacheGrpIds)
Blocks (stops) cache gateway for caches according to given
cacheGroupIds. |
<K,V> IgniteInternalCache<K,V> |
cache(String name) |
CacheConfiguration |
cacheConfiguration(String name)
Get configuration for the given cache.
|
@Nullable DynamicCacheDescriptor |
cacheDescriptor(int cacheId) |
DynamicCacheDescriptor |
cacheDescriptor(String name)
Get registered cache descriptor.
|
Map<String,DynamicCacheDescriptor> |
cacheDescriptors() |
@Nullable CacheGroupContext |
cacheGroup(int grpId) |
CacheGroupDescriptor |
cacheGroupDescriptor(int grpId)
Tries to find cache group descriptor either in registered cache groups
or in marked for deletion collection if cache group is considered to be stopped.
|
Map<Integer,CacheGroupDescriptor> |
cacheGroupDescriptors() |
Collection<CacheGroupContext> |
cacheGroups() |
CacheMode |
cacheMode(String cacheName)
Gets cache mode.
|
Collection<String> |
cacheNames()
Gets a collection of currently started caches.
|
Collection<IgniteInternalCache<?,?>> |
caches() |
CacheType |
cacheType(String cacheName) |
IgniteInternalFuture<Boolean> |
changeWalMode(Collection<String> cacheNames,
boolean enabled)
Change WAL mode.
|
void |
checkEmptyTransactions()
Method checks that current thread does not have active transactions.
|
void |
cleanupCachesDirectories()
Remove all persistent files for all registered caches.
|
void |
clearStatistics(Collection<String> cacheNames)
Clear statistics globally for the caches
|
<T> T |
clone(T obj) |
void |
collectGridNodeData(DiscoveryDataBag dataBag)
Collects discovery data on nodes already in grid on receiving
TcpDiscoveryNodeAddedMessage. |
void |
collectJoiningNodeData(DiscoveryDataBag dataBag)
Collects discovery data on joining node before sending
TcpDiscoveryJoinRequestMessage request. |
void |
completeCacheStartFuture(DynamicCacheChangeRequest req,
boolean success,
@Nullable Throwable err) |
void |
completeProxyInitialize(String name) |
void |
completeProxyRestart(Map<String,DynamicCacheChangeRequest> reqs,
AffinityTopologyVersion initVer,
AffinityTopologyVersion doneVer) |
<K,V> GridCacheSharedContext<K,V> |
context() |
IgniteInternalFuture<?> |
createFromTemplate(String cacheName)
Dynamically starts cache using template configuration.
|
@NotNull DynamicCacheChangeRequest |
createStopRequest(String cacheName,
boolean restart,
IgniteUuid restartId,
boolean destroy)
Prepares cache stop request.
|
@Nullable GridComponent.DiscoveryDataExchangeType |
discoveryDataType()
Gets unique component type to distinguish components providing discovery data.
|
@NotNull IgniteInternalFuture<?> |
dynamicChangeCaches(List<DynamicCacheChangeRequest> reqs)
Starts cache stop request as cache change batch.
|
IgniteInternalFuture<Boolean> |
dynamicDestroyCache(String cacheName,
boolean sql,
boolean checkThreadTx,
boolean restart,
IgniteUuid restartId) |
IgniteInternalFuture<?> |
dynamicDestroyCaches(Collection<String> cacheNames,
boolean checkThreadTx) |
IgniteInternalFuture<?> |
dynamicDestroyCaches(Collection<String> cacheNames,
boolean checkThreadTx,
boolean destroy) |
IgniteInternalFuture<Boolean> |
dynamicStartCache(@Nullable CacheConfiguration ccfg,
String cacheName,
@Nullable NearCacheConfiguration nearCfg,
boolean failIfExists,
boolean failIfNotStarted,
boolean checkThreadTx)
Dynamically starts cache.
|
IgniteInternalFuture<Boolean> |
dynamicStartCache(@Nullable CacheConfiguration ccfg,
String cacheName,
@Nullable NearCacheConfiguration nearCfg,
CacheType cacheType,
boolean sql,
boolean failIfExists,
boolean failIfNotStarted,
boolean checkThreadTx)
Dynamically starts cache.
|
IgniteInternalFuture<Boolean> |
dynamicStartCaches(Collection<CacheConfiguration> ccfgList,
boolean failIfExists,
boolean checkThreadTx,
boolean disabledAfterStart)
Dynamically starts multiple caches.
|
IgniteInternalFuture<Boolean> |
dynamicStartCachesByStoredConf(Collection<StoredCacheData> storedCacheDataList,
boolean failIfExists,
boolean checkThreadTx,
boolean disabledAfterStart,
IgniteUuid restartId)
Dynamically starts multiple caches.
|
IgniteInternalFuture<Boolean> |
dynamicStartSqlCache(CacheConfiguration ccfg)
Dynamically starts cache as a result of SQL
CREATE TABLE command. |
void |
enableRebalance()
Start cache rebalance.
|
void |
enableStatistics(Collection<String> cacheNames,
boolean enabled)
Enable/disable statistics globally for the caches
|
CacheConfigurationEnricher |
enricher() |
CachePartitionExchangeWorkerTask |
exchangeTaskForCustomDiscoveryMessage(DiscoveryCustomMessage msg)
Create exchange worker task for custom discovery message.
|
CacheConfiguration |
getConfigFromTemplate(String cacheName) |
IgniteInternalFuture<?> |
getOrCreateFromTemplate(String cacheName,
boolean checkThreadTx)
Dynamically starts cache using template configuration.
|
IgniteInternalFuture<?> |
getOrCreateFromTemplate(String cacheName,
String templateName,
CacheConfigurationOverride cfgOverride,
boolean checkThreadTx)
Dynamically starts cache using template configuration.
|
<K,V> IgniteInternalCache<K,V> |
getOrStartCache(String name) |
<K,V> IgniteInternalCache<K,V> |
getOrStartCache(String name,
CacheConfiguration ccfg) |
IgniteCacheProxy<?,?> |
getOrStartPublicCache(boolean start,
boolean inclLoc)
Gets public cache that can be used for query execution.
|
MetaStorage.TmpStorage |
getTmpStorage()
Get Temporary storage
|
boolean |
hasCachesReceivedFromJoin(ClusterNode node) |
void |
initQueryStructuresForNotStartedCache(DynamicCacheDescriptor cacheDesc)
Initialize query infrastructure for not started cache.
|
<K,V> GridCacheAdapter<K,V> |
internalCache(String name) |
Collection<GridCacheAdapter<?,?>> |
internalCaches() |
boolean |
isCacheRestarting(String cacheName) |
<K,V> IgniteCacheProxy<K,V> |
jcache(String name) |
@Nullable IgniteCacheProxyImpl<?,?> |
jcacheProxy(String name,
boolean awaitInit) |
Collection<IgniteCacheProxy<?,?>> |
jcaches() |
boolean |
keepStaticCacheConfiguration() |
@Nullable LocalJoinCachesContext |
localJoinCachesContext() |
void |
longTransactionTimeDumpSamplesPerSecondLimit(int limit)
Sets the limit of samples of completed transactions that will be dumped in log per second,
if
transactionTimeDumpSamplesCoefficient(double) is above 0.0. |
void |
longTransactionTimeDumpThreshold(long threshold)
Sets threshold timeout in milliseconds for long transactions, if transaction exceeds it,
it will be dumped in log with information about how much time did
it spent in system time (time while aquiring locks, preparing, commiting, etc.)
|
void |
onCacheStatisticsModeChange(CacheStatisticsModeChangeMessage msg)
Cache statistics flag change message received.
|
boolean |
onCustomEvent(DiscoveryCustomMessage msg,
AffinityTopologyVersion topVer,
ClusterNode node)
Callback invoked from discovery thread when discovery custom message is received.
|
void |
onDisconnected(IgniteFuture<?> reconnectFut)
Client disconnected callback.
|
void |
onDiscoveryEvent(int type,
@Nullable DiscoveryCustomMessage customMsg,
ClusterNode node,
AffinityTopologyVersion topVer,
DiscoveryDataClusterState state) |
void |
onExchangeDone(AffinityTopologyVersion cacheStartVer,
@Nullable ExchangeActions exchActions,
@Nullable Throwable err)
Callback invoked when first exchange future for dynamic cache is completed.
|
void |
onGridDataReceived(DiscoveryDataBag.GridDiscoveryData data)
Receives discovery data object from remote nodes (called
on new node during discovery process).
|
void |
onJoiningNodeDataReceived(DiscoveryDataBag.JoiningNodeDiscoveryData data)
Method is called on nodes that are already in grid (not on joining node).
|
void |
onKernalStart(boolean active)
Callback that notifies that kernal has successfully started,
including all managers and processors.
|
void |
onKernalStop(boolean cancel)
Callback to notify that kernal is about to stop.
|
void |
onKernalStopCaches(boolean cancel) |
IgniteInternalFuture<?> |
onReconnected(boolean clusterRestarted)
Client reconnected callback.
|
void |
onStateChangeFinish(ChangeGlobalStateFinishMessage msg) |
ExchangeActions |
onStateChangeRequest(ChangeGlobalStateMessage msg,
AffinityTopologyVersion topVer,
DiscoveryDataClusterState curState) |
void |
onTxTimeoutOnPartitionMapExchangeChange(TxTimeoutOnPartitionMapExchangeChangeMessage msg)
Callback invoked from discovery thread when discovery custom message is received.
|
void |
onUndeployed(ClassLoader ldr)
Callback invoked by deployment manager for whenever a class loader gets undeployed.
|
Collection<DynamicCacheDescriptor> |
persistentCaches() |
Collection<CacheGroupDescriptor> |
persistentGroups() |
void |
prepareCacheStart(DynamicCacheDescriptor desc,
@Nullable NearCacheConfiguration reqNearCfg,
AffinityTopologyVersion exchTopVer,
boolean disabledAfterStart,
boolean clientCache) |
GridCacheContext<?,?> |
prepareCacheStop(String cacheName,
boolean destroy) |
void |
preparePageStore(DynamicCacheDescriptor desc,
boolean affNode)
Prepare page store for start cache.
|
void |
printMemoryStats()
Prints memory statistics (sizes of internal structures, etc.).
|
void |
processStatisticsModeChange(CacheStatisticsModeChangeMessage msg)
Cache statistics flag change task processed by exchange worker.
|
void |
processTxTimeoutOnPartitionMapExchangeChange(TxTimeoutOnPartitionMapExchangeChangeMessage msg)
The task for changing transaction timeout on partition map exchange processed by exchange worker.
|
Collection<String> |
publicAndDsCacheNames()
Gets a collection of currently started public cache names.
|
<K,V> IgniteInternalCache<K,V> |
publicCache(String name) |
Collection<String> |
publicCacheNames()
Gets a collection of currently started public cache names.
|
Collection<IgniteCacheProxy<?,?>> |
publicCaches() |
<K,V> IgniteCacheProxy<K,V> |
publicJCache(String cacheName) |
<K,V> @Nullable IgniteCacheProxy<K,V> |
publicJCache(String cacheName,
boolean failIfNotStarted,
boolean checkThreadTx) |
void |
registrateProxyRestart(Map<String,DynamicCacheChangeRequest> reqs,
GridFutureAdapter<?> fut) |
IgniteInternalFuture<?> |
resetCacheState(Collection<String> cacheNames)
Resets cache state after the cache has been moved to recovery state.
|
List<String> |
resetRestartingProxies()
Complete stopping of caches if they were marked as restarting but it failed.
|
void |
restartProxies()
Restarts proxies of caches if they was marked as restarting.
|
void |
saveCacheConfiguration(DynamicCacheDescriptor desc)
Save cache configuration to persistent store if necessary.
|
void |
saveCacheConfiguration(StoredCacheData storedCacheData,
boolean overwrite)
Save cache configuration to persistent store if necessary.
|
void |
setTmpStorage(MetaStorage.TmpStorage tmpStorage)
Set Temporary storage
|
void |
setTxOwnerDumpRequestsAllowed(boolean allowed)
Sets if dump requests from local node to near node are allowed, when long running transaction
is found.
|
void |
setTxTimeoutOnPartitionMapExchange(long timeout)
Sets transaction timeout on partition map exchange.
|
void |
shutdownNotFinishedRecoveryCaches()
Stops all caches and groups, that was recovered, but not activated on node join.
|
CacheConfigurationSplitter |
splitter() |
void |
start()
Starts grid component.
|
IgniteInternalFuture<?> |
startCachesOnLocalJoin(AffinityTopologyVersion exchTopVer,
LocalJoinCachesContext locJoinCtx) |
Collection<DynamicCacheDescriptor> |
startReceivedCaches(UUID nodeId,
AffinityTopologyVersion exchTopVer)
Starts statically configured caches received from remote nodes during exchange.
|
void |
stop(boolean cancel)
Stops grid component.
|
void |
stopCaches(boolean cancel) |
boolean |
systemCache(String name) |
IgniteTransactionsEx |
transactions() |
void |
transactionTimeDumpSamplesCoefficient(double coefficient)
Sets the coefficient for samples of long running transactions that will be dumped in log, if
longTransactionTimeDumpThreshold(long) is set to non-zero value." |
<K,V> IgniteInternalCache<K,V> |
utilityCache()
Gets utility cache.
|
@Nullable IgniteNodeValidationResult |
validateNode(ClusterNode node)
Validates that new node can join grid topology, this method is called on coordinator
node before new node joins topology.
|
@Nullable IgniteNodeValidationResult |
validateNode(ClusterNode node,
DiscoveryDataBag.JoiningNodeDiscoveryData discoData)
Validates that new node can join grid topology, this method is called on coordinator
node before new node joins topology.
|
boolean |
walEnabled(String cacheName) |
assertParameter, toStringpublic GridCacheProcessor(GridKernalContext ctx)
ctx - Kernal context.public void enableRebalance()
public CachePartitionExchangeWorkerTask exchangeTaskForCustomDiscoveryMessage(DiscoveryCustomMessage msg)
msg - Custom discovery message.null if message doesn't require any special processing.public void start()
throws IgniteCheckedException
start in interface GridComponentstart in class GridProcessorAdapterIgniteCheckedException - Throws in case of any errors.@Nullable public @Nullable CacheGroupContext cacheGroup(int grpId)
grpId - Group ID.public Collection<CacheGroupContext> cacheGroups()
public void onKernalStart(boolean active)
throws IgniteCheckedException
onKernalStart in interface GridComponentonKernalStart in class GridProcessorAdapteractive - Cluster active flag (note: should be used carefully since state can
change concurrently).IgniteCheckedException - Thrown in case of any errors.public void stop(boolean cancel)
throws IgniteCheckedException
stop in interface GridComponentstop in class GridProcessorAdaptercancel - If true, then all ongoing tasks or jobs for relevant
components need to be cancelled.IgniteCheckedException - Thrown in case of any errors.public void stopCaches(boolean cancel)
cancel - Cancel.public void blockGateways()
public List<GridCacheAdapter> blockGateways(Collection<Integer> cacheGrpIds)
cacheGroupIds.cacheGrpIds - Cache group ids for which cache gateway should be stopped.public void onKernalStop(boolean cancel)
onKernalStop in interface GridComponentonKernalStop in class GridProcessorAdaptercancel - Flag indicating whether jobs should be canceled.public void onKernalStopCaches(boolean cancel)
cancel - Cancel.public void onDisconnected(IgniteFuture<?> reconnectFut) throws IgniteCheckedException
onDisconnected in interface GridComponentonDisconnected in class GridProcessorAdapterreconnectFut - Reconnect future.IgniteCheckedException - If failed.public IgniteInternalFuture<?> onReconnected(boolean clusterRestarted) throws IgniteCheckedException
onReconnected in interface GridComponentonReconnected in class GridProcessorAdapterclusterRestarted - Cluster restarted flag.IgniteCheckedException - If failed.public void initQueryStructuresForNotStartedCache(DynamicCacheDescriptor cacheDesc) throws IgniteCheckedException
cacheDesc - Cache descriptor.IgniteCheckedException - If failed.public void awaitStarted()
throws IgniteCheckedException
IgniteCheckedException - If failed to wait.public void registrateProxyRestart(Map<String,DynamicCacheChangeRequest> reqs, GridFutureAdapter<?> fut)
reqs - Cache requests to start.fut - Completable future.public void completeProxyRestart(Map<String,DynamicCacheChangeRequest> reqs, AffinityTopologyVersion initVer, AffinityTopologyVersion doneVer)
reqs - Cache requests to start.initVer - Init exchange version.doneVer - Finish excahnge vertison.public Collection<String> cacheNames()
public IgniteCacheProxy<?,?> getOrStartPublicCache(boolean start, boolean inclLoc) throws IgniteCheckedException
start - Start cache.inclLoc - Include local caches.null if there is no suitable cache.IgniteCheckedExceptionpublic Collection<String> publicCacheNames()
public Collection<String> publicAndDsCacheNames()
public CacheMode cacheMode(String cacheName)
cacheName - Cache name to check.@Nullable public @Nullable LocalJoinCachesContext localJoinCachesContext()
public IgniteInternalFuture<?> startCachesOnLocalJoin(AffinityTopologyVersion exchTopVer, LocalJoinCachesContext locJoinCtx) throws IgniteCheckedException
exchTopVer - Local join exchange future version.locJoinCtx - Local join cache context.IgniteCheckedException - If failed.public boolean hasCachesReceivedFromJoin(ClusterNode node)
node - Joined node.True if there are new caches received from joined node.public Collection<DynamicCacheDescriptor> startReceivedCaches(UUID nodeId, AffinityTopologyVersion exchTopVer) throws IgniteCheckedException
nodeId - Joining node ID.exchTopVer - Current exchange version.IgniteCheckedException - If failed.public void prepareCacheStart(DynamicCacheDescriptor desc, @Nullable @Nullable NearCacheConfiguration reqNearCfg, AffinityTopologyVersion exchTopVer, boolean disabledAfterStart, boolean clientCache) throws IgniteCheckedException
desc - Cache descriptor.reqNearCfg - Near configuration if specified for client cache start request.exchTopVer - Current exchange version.disabledAfterStart - If true, then we will discard restarting state from proxies. If false then we will
change state of proxies to restartingIgniteCheckedException - If failed.public void shutdownNotFinishedRecoveryCaches()
public void preparePageStore(DynamicCacheDescriptor desc, boolean affNode) throws IgniteCheckedException
desc - Cache descriptor.affNode - true if it is affinity node for cache.IgniteCheckedException - if failed.public void restartProxies()
public List<String> resetRestartingProxies()
public void blockGateway(String cacheName, boolean stop, boolean restart)
cacheName - Cache name.stop - True for stop cache, false for close cache.restart - Restart flag.public GridCacheContext<?,?> prepareCacheStop(String cacheName, boolean destroy)
cacheName - Cache name.destroy - Cache data destroy flag. Setting to true will remove all cache data.public void onExchangeDone(AffinityTopologyVersion cacheStartVer, @Nullable @Nullable ExchangeActions exchActions, @Nullable @Nullable Throwable err)
cacheStartVer - Started caches version to create proxy for.exchActions - Change requests.err - Error.public void completeCacheStartFuture(DynamicCacheChangeRequest req, boolean success, @Nullable @Nullable Throwable err)
req - Request to complete future for.success - Future result.err - Error if any.@Nullable public @Nullable GridComponent.DiscoveryDataExchangeType discoveryDataType()
GridComponent.collectJoiningNodeData(DiscoveryDataBag)
or GridComponent.collectGridNodeData(DiscoveryDataBag).discoveryDataType in interface GridComponentdiscoveryDataType in class GridProcessorAdapterpublic void collectJoiningNodeData(DiscoveryDataBag dataBag)
TcpDiscoveryJoinRequestMessage request.collectJoiningNodeData in interface GridComponentcollectJoiningNodeData in class GridProcessorAdapterdataBag - container object to store discovery data in.public void collectGridNodeData(DiscoveryDataBag dataBag)
TcpDiscoveryNodeAddedMessage.collectGridNodeData in interface GridComponentcollectGridNodeData in class GridProcessorAdapterdataBag - container object to store discovery data in.public void onJoiningNodeDataReceived(DiscoveryDataBag.JoiningNodeDiscoveryData data)
onJoiningNodeDataReceived in interface GridComponentonJoiningNodeDataReceived in class GridProcessorAdapterdata - DiscoveryDataBag.JoiningNodeDiscoveryData interface to retrieve discovery data of joining node.public void onGridDataReceived(DiscoveryDataBag.GridDiscoveryData data)
onGridDataReceived in interface GridComponentonGridDataReceived in class GridProcessorAdapterdata - DiscoveryDataBag.GridDiscoveryData interface to retrieve discovery data collected on remote nodes
(data common for all nodes in grid and specific for each node).@Nullable public @Nullable IgniteNodeValidationResult validateNode(ClusterNode node, DiscoveryDataBag.JoiningNodeDiscoveryData discoData)
validateNode in interface GridComponentvalidateNode in class GridProcessorAdapternode - Joining node.discoData - Joining node discovery data.null in case of success.public void onStateChangeFinish(ChangeGlobalStateFinishMessage msg)
msg - Message.public ExchangeActions onStateChangeRequest(ChangeGlobalStateMessage msg, AffinityTopologyVersion topVer, DiscoveryDataClusterState curState) throws IgniteCheckedException
msg - Message.topVer - Current topology version.curState - Current cluster state.IgniteCheckedException - If configuration validation failed.public void onCacheStatisticsModeChange(CacheStatisticsModeChangeMessage msg)
msg - Message.public void processStatisticsModeChange(CacheStatisticsModeChangeMessage msg)
msg - Message.public void onTxTimeoutOnPartitionMapExchangeChange(TxTimeoutOnPartitionMapExchangeChangeMessage msg)
msg - Discovery message for changing transaction timeout on partition map exchange.public void processTxTimeoutOnPartitionMapExchangeChange(TxTimeoutOnPartitionMapExchangeChangeMessage msg)
msg - Message.public IgniteInternalFuture<?> createFromTemplate(String cacheName)
cacheName - Cache name.public IgniteInternalFuture<?> getOrCreateFromTemplate(String cacheName, boolean checkThreadTx)
cacheName - Cache name.checkThreadTx - If true checks that current thread does not have active transactions.public IgniteInternalFuture<?> getOrCreateFromTemplate(String cacheName, String templateName, CacheConfigurationOverride cfgOverride, boolean checkThreadTx)
cacheName - Cache name.templateName - Cache template name.cfgOverride - Cache config properties to override.checkThreadTx - If true checks that current thread does not have active transactions.public CacheConfiguration getConfigFromTemplate(String cacheName) throws IgniteCheckedException
cacheName - Cache name.null if no template with matching name found.IgniteCheckedException - If failed.public IgniteInternalFuture<Boolean> dynamicStartCache(@Nullable @Nullable CacheConfiguration ccfg, String cacheName, @Nullable @Nullable NearCacheConfiguration nearCfg, boolean failIfExists, boolean failIfNotStarted, boolean checkThreadTx)
ccfg - Cache configuration.cacheName - Cache name.nearCfg - Near cache configuration.failIfExists - Fail if exists flag.failIfNotStarted - If true fails if cache is not started.checkThreadTx - If true checks that current thread does not have active transactions.public IgniteInternalFuture<Boolean> dynamicStartSqlCache(CacheConfiguration ccfg)
CREATE TABLE command.ccfg - Cache configuration.public IgniteInternalFuture<Boolean> dynamicStartCache(@Nullable @Nullable CacheConfiguration ccfg, String cacheName, @Nullable @Nullable NearCacheConfiguration nearCfg, CacheType cacheType, boolean sql, boolean failIfExists, boolean failIfNotStarted, boolean checkThreadTx)
ccfg - Cache configuration.cacheName - Cache name.nearCfg - Near cache configuration.cacheType - Cache type.sql - If the cache needs to be created as the result of SQL CREATE TABLE command.failIfExists - Fail if exists flag.failIfNotStarted - If true fails if cache is not started.checkThreadTx - If true checks that current thread does not have active transactions.public IgniteInternalFuture<Boolean> dynamicStartCaches(Collection<CacheConfiguration> ccfgList, boolean failIfExists, boolean checkThreadTx, boolean disabledAfterStart)
ccfgList - Collection of cache configuration.failIfExists - Fail if exists flag.checkThreadTx - If true checks that current thread does not have active transactions.disabledAfterStart - If true, cache proxies will be only activated after restartProxies().public IgniteInternalFuture<Boolean> dynamicStartCachesByStoredConf(Collection<StoredCacheData> storedCacheDataList, boolean failIfExists, boolean checkThreadTx, boolean disabledAfterStart, IgniteUuid restartId)
storedCacheDataList - Collection of stored cache data.failIfExists - Fail if exists flag.checkThreadTx - If true checks that current thread does not have active transactions.disabledAfterStart - If true, cache proxies will be only activated after restartProxies().restartId - Restart requester id (it'll allow to start this cache only him).public IgniteInternalFuture<Boolean> dynamicDestroyCache(String cacheName, boolean sql, boolean checkThreadTx, boolean restart, IgniteUuid restartId)
cacheName - Cache name to destroy.sql - If the cache needs to be destroyed only if it was created as the result of SQL CREATE TABLE
command.checkThreadTx - If true checks that current thread does not have active transactions.restart - Restart flag.restartId - Restart requester id (it'll allow to start this cache only him).public IgniteInternalFuture<?> dynamicDestroyCaches(Collection<String> cacheNames, boolean checkThreadTx)
cacheNames - Collection of cache names to destroy.checkThreadTx - If true checks that current thread does not have active transactions.public IgniteInternalFuture<?> dynamicDestroyCaches(Collection<String> cacheNames, boolean checkThreadTx, boolean destroy)
cacheNames - Collection of cache names to destroy.checkThreadTx - If true checks that current thread does not have active transactions.destroy - Cache data destroy flag. Setting to true will cause removing all cache data@NotNull public @NotNull DynamicCacheChangeRequest createStopRequest(String cacheName, boolean restart, IgniteUuid restartId, boolean destroy)
cacheName - Cache names to destroy.restart - Restart flag.restartId - Restart requester id (it'll allow to start this cache only him).destroy - Cache data destroy flag. Setting to true will cause removing all cache data from store.@NotNull public @NotNull IgniteInternalFuture<?> dynamicChangeCaches(List<DynamicCacheChangeRequest> reqs)
reqs - cache stop requests.public IgniteInternalFuture<Boolean> changeWalMode(Collection<String> cacheNames, boolean enabled)
cacheNames - Cache names.enabled - Enabled flag.public boolean walEnabled(String cacheName)
cacheName - Cache name.public IgniteInternalFuture<?> resetCacheState(Collection<String> cacheNames)
cacheNames - Cache names.public CacheType cacheType(String cacheName)
cacheName - Cache name.public void saveCacheConfiguration(DynamicCacheDescriptor desc) throws IgniteCheckedException
desc - Cache descriptor.IgniteCheckedExceptionpublic void saveCacheConfiguration(StoredCacheData storedCacheData, boolean overwrite) throws IgniteCheckedException
storedCacheData - Stored cache data.overwrite - Overwrite existing.IgniteCheckedExceptionpublic void cleanupCachesDirectories()
throws IgniteCheckedException
IgniteCheckedExceptionpublic void onDiscoveryEvent(int type,
@Nullable
@Nullable DiscoveryCustomMessage customMsg,
ClusterNode node,
AffinityTopologyVersion topVer,
DiscoveryDataClusterState state)
type - Event type.customMsg - Custom message instance.node - Event node.topVer - Topology version.state - Cluster state.public boolean onCustomEvent(DiscoveryCustomMessage msg, AffinityTopologyVersion topVer, ClusterNode node)
msg - Customer message.topVer - Current topology version.node - Node sent message.True if minor topology version should be increased.@Nullable public @Nullable IgniteNodeValidationResult validateNode(ClusterNode node)
validateNode in interface GridComponentvalidateNode in class GridProcessorAdapternode - Joining node.null in case of success.public boolean isCacheRestarting(String cacheName)
cacheName - Cache to check.public boolean keepStaticCacheConfiguration()
true, static cache configuration will override
configuration persisted on disk.public <K,V> IgniteInternalCache<K,V> cache(String name)
K - type of keys.V - type of values.name - Cache name.public void completeProxyInitialize(String name)
name - Cache name.public <K,V> IgniteInternalCache<K,V> getOrStartCache(String name) throws IgniteCheckedException
name - Cache name.IgniteCheckedException - If failed.public <K,V> IgniteInternalCache<K,V> getOrStartCache(String name, CacheConfiguration ccfg) throws IgniteCheckedException
name - Cache name.IgniteCheckedException - If failed.public Collection<IgniteInternalCache<?,?>> caches()
public Collection<IgniteCacheProxy<?,?>> jcaches()
public <K,V> IgniteInternalCache<K,V> utilityCache()
public <K,V> IgniteInternalCache<K,V> publicCache(String name)
K - type of keys.V - type of values.name - Cache name.public <K,V> IgniteCacheProxy<K,V> publicJCache(String cacheName) throws IgniteCheckedException
K - type of keys.V - type of values.cacheName - Cache name.IgniteCheckedException - If failed.@Nullable public <K,V> @Nullable IgniteCacheProxy<K,V> publicJCache(String cacheName, boolean failIfNotStarted, boolean checkThreadTx) throws IgniteCheckedException
cacheName - Cache name.failIfNotStarted - If true throws IllegalArgumentException if cache is not started,
otherwise returns null in this case.checkThreadTx - If true checks that current thread does not have active transactions.IgniteCheckedException - If failed.public CacheConfiguration cacheConfiguration(String name)
name - Cache name.public DynamicCacheDescriptor cacheDescriptor(String name)
name - Name.public Map<String,DynamicCacheDescriptor> cacheDescriptors()
public Collection<DynamicCacheDescriptor> persistentCaches()
public Collection<CacheGroupDescriptor> persistentGroups()
public Map<Integer,CacheGroupDescriptor> cacheGroupDescriptors()
public CacheGroupDescriptor cacheGroupDescriptor(int grpId)
grpId - Group id.@Nullable public @Nullable DynamicCacheDescriptor cacheDescriptor(int cacheId)
cacheId - Cache ID.public void addCacheConfiguration(CacheConfiguration cacheCfg) throws IgniteCheckedException
cacheCfg - Cache configuration template.IgniteCheckedException - If failed.public <K,V> IgniteCacheProxy<K,V> jcache(String name)
name - Cache name.@Nullable public @Nullable IgniteCacheProxyImpl<?,?> jcacheProxy(String name, boolean awaitInit)
name - Cache name.awaitInit - Await proxy initialization.@Nullable public @Nullable IgniteCacheProxyImpl<?,?> addjCacheProxy(String name, IgniteCacheProxyImpl<?,?> proxy)
name - Cache name.proxy - Cache proxy.public Collection<IgniteCacheProxy<?,?>> publicCaches()
public <K,V> GridCacheAdapter<K,V> internalCache(String name)
K - type of keys.V - type of values.name - Cache name.public Collection<GridCacheAdapter<?,?>> internalCaches()
public boolean systemCache(String name)
name - Cache name.True if specified cache is system, false otherwise.public void printMemoryStats()
printMemoryStats in interface GridComponentprintMemoryStats in class GridProcessorAdapterpublic void onUndeployed(ClassLoader ldr)
ldr - Class loader.public <K,V> GridCacheSharedContext<K,V> context()
public IgniteTransactionsEx transactions()
public void checkEmptyTransactions()
throws IgniteException
IgniteException - If transaction exist.public void enableStatistics(Collection<String> cacheNames, boolean enabled) throws IgniteCheckedException
cacheNames - Collection of cache names.enabled - Statistics enabled flag.IgniteCheckedExceptionpublic void clearStatistics(Collection<String> cacheNames) throws IgniteCheckedException
cacheNames - Collection of cache names.IgniteCheckedExceptionpublic void setTxTimeoutOnPartitionMapExchange(long timeout)
throws IgniteCheckedException
timeout - Transaction timeout on partition map exchange in milliseconds.IgniteCheckedExceptionpublic <T> T clone(T obj)
throws IgniteCheckedException
obj - Object to clone.IgniteCheckedException - If failed.public MetaStorage.TmpStorage getTmpStorage()
public void setTmpStorage(MetaStorage.TmpStorage tmpStorage)
public void setTxOwnerDumpRequestsAllowed(boolean allowed)
allowed - whether allowedpublic void longTransactionTimeDumpThreshold(long threshold)
threshold - Threshold timeout in milliseconds.public void transactionTimeDumpSamplesCoefficient(double coefficient)
longTransactionTimeDumpThreshold(long) is set to non-zero value."coefficient - Coefficient, must be value between 0.0 and 1.0 inclusively.public void longTransactionTimeDumpSamplesPerSecondLimit(int limit)
transactionTimeDumpSamplesCoefficient(double) is above 0.0.
Must be integer value greater than 0.limit - Limit value.public CacheConfigurationSplitter splitter()
public CacheConfigurationEnricher enricher()
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.8.0 Release Date : February 27 2020