public class IgniteStatisticsManagerImpl extends Object implements IgniteStatisticsManager
| Constructor and Description |
|---|
IgniteStatisticsManagerImpl(GridKernalContext ctx)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
collectStatistics(StatisticsObjectConfiguration... targets)
Gather object statistics.
|
void |
dropAll()
Drop all statistics.
|
void |
dropStatistics(StatisticsTarget... targets)
Clear object statistics.
|
void |
ensureActive(String op)
Check that cluster is active.
|
ObjectStatistics |
getGlobalStatistics(StatisticsKey key)
Get global statistics by object.
|
ObjectStatistics |
getLocalStatistics(StatisticsKey key)
Get local statistics by object.
|
ObjectStatisticsImpl |
getLocalStatistics(StatisticsKey key,
AffinityTopologyVersion topVer)
Get local statitsics with specified topology version if exists.
|
void |
onRowUpdated(String schemaName,
String objName,
int partId,
byte[] keyBytes)
To track statistics invalidation.
|
void |
processObsolescence()
Save dirty obsolescence info to local metastore.
|
void |
refreshStatistics(StatisticsTarget... targets)
Refresh object statistics.
|
IgniteStatisticsConfigurationManager |
statisticConfiguration() |
IgniteStatisticsRepository |
statisticsRepository() |
void |
stop()
Stop statistic manager.
|
void |
subscribeToLocalStatistics(Consumer<ObjectStatisticsEvent> subscriber)
Subscribe to all local statistics changes.
|
void |
subscribeToStatisticsConfig(Consumer<StatisticsObjectConfiguration> subscriber)
Subscribe to all statistics configuration changed.
|
StatisticsUsageState |
usageState() |
void |
usageState(StatisticsUsageState state)
Set statistics usage state.
|
public IgniteStatisticsManagerImpl(GridKernalContext ctx)
ctx - Kernal context.public IgniteStatisticsRepository statisticsRepository()
public ObjectStatistics getLocalStatistics(StatisticsKey key)
getLocalStatistics in interface IgniteStatisticsManagerkey - Statistic key.null if there are no available statistics by specified object.public ObjectStatisticsImpl getLocalStatistics(StatisticsKey key, AffinityTopologyVersion topVer)
key - Key to get statistics by.topVer - Required topology version.null if there are no statistics with requested topology version.public ObjectStatistics getGlobalStatistics(StatisticsKey key)
getGlobalStatistics in interface IgniteStatisticsManagerkey - Statistic key.null if there are no available global statistics by specified object.public void collectStatistics(StatisticsObjectConfiguration... targets) throws IgniteCheckedException
collectStatistics in interface IgniteStatisticsManagertargets - Target to params map to gather statistics by.IgniteCheckedException - Throws in case of errors.public void dropStatistics(StatisticsTarget... targets) throws IgniteCheckedException
dropStatistics in interface IgniteStatisticsManagertargets - Collection of target to collect statistics by (schema, obj, columns).IgniteCheckedException - In case of errors (for example: unsupported feature)public void refreshStatistics(StatisticsTarget... targets) throws IgniteCheckedException
refreshStatistics in interface IgniteStatisticsManagertargets - Target to refresh statistics by.IgniteCheckedException - Throws in case of errors.public void dropAll()
throws IgniteCheckedException
dropAll in interface IgniteStatisticsManagerIgniteCheckedExceptionpublic void stop()
stop in interface IgniteStatisticsManagerpublic IgniteStatisticsConfigurationManager statisticConfiguration()
public void usageState(StatisticsUsageState state) throws IgniteCheckedException
usageState in interface IgniteStatisticsManagerstate - Statistics state.IgniteCheckedExceptionpublic StatisticsUsageState usageState()
usageState in interface IgniteStatisticsManagerpublic void onRowUpdated(String schemaName, String objName, int partId, byte[] keyBytes)
onRowUpdated in interface IgniteStatisticsManagerschemaName - Schema name.objName - Object name.partId - Partition id.keyBytes - Row key bytes.public void processObsolescence()
public void subscribeToLocalStatistics(Consumer<ObjectStatisticsEvent> subscriber)
subscriber - Local statitics subscriber.public void subscribeToStatisticsConfig(Consumer<StatisticsObjectConfiguration> subscriber)
subscriber - Statistics configuration subscriber.public void ensureActive(String op)
op - Operation name.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.15.0 Release Date : April 25 2023