Package com.j_spaces.core.admin
Interface StatisticsAdmin
- All Superinterfaces:
Remote
- All Known Implementing Classes:
JSpaceAdminImpl,JSpaceAdminProxy,SpaceImpl
Provides a space statistics API.
- Version:
- 4.0
- Author:
- Michael Konnikov
-
Method Summary
Modifier and TypeMethodDescriptiongetMetricSnapshots(Collection<String> prefixes) Returns statistics repository that contains a map of operation codes toStatisticsContextobjects for all filter operation codes.getStatistics(int operationCode) Returns aStatisticsContextfor specific filter operation code.getStatistics(Integer[] operationCodes) Returns statistics repository that contains a map of operation codes toStatisticsContextobjects for passed specific filter operation codes.longChecks statistics sampling rate.String[]Returns a string array contains statistics values for each operation.booleanChecks if space statistics is available.voidsetStatisticsSamplingRate(long rate) Set statistics sampling rate.
-
Method Details
-
isStatisticsAvailable
Checks if space statistics is available.- Returns:
trueif space statistics is available- Throws:
RemoteException- if a communication error occurs
-
getStatisticsStringArray
Returns a string array contains statistics values for each operation. For example: WRITE count: 10000, average time for last 2 seconds is 4293.1 READ count: 10000, average time for last 2 seconds is 4293.1- Returns:
- array of Strings that represents the space statistics
- Throws:
StatisticsNotAvailable- when space statistics are not availableRemoteException- if a communication error occurs
-
setStatisticsSamplingRate
Set statistics sampling rate.- Parameters:
rate- the rate to sample the space for statistics- Throws:
StatisticsNotAvailable- when space statistics are not availableRemoteException- if a communication error occurs
-
getStatisticsSamplingRate
Checks statistics sampling rate.- Returns:
- the statistics sampling rate
- Throws:
StatisticsNotAvailable- when space statistics are not availableRemoteException- if a communication error occurs
-
getStatistics
Returns aStatisticsContextfor specific filter operation code.- Parameters:
operationCode- filter operation code defined inFilterOperationCodes- Returns:
- StatisticsContext for the given operation code
- Throws:
StatisticsNotAvailable- when space statistics are not availableRemoteException- if a communication error occurs- See Also:
-
getStatistics
Map<Integer,StatisticsContext> getStatistics(Integer[] operationCodes) throws StatisticsNotAvailable, RemoteException Returns statistics repository that contains a map of operation codes toStatisticsContextobjects for passed specific filter operation codes.- Parameters:
operationCodes- filter array of operation codes defined inFilterOperationCodes- Returns:
- map of operation codes to
StatisticsContext - Throws:
StatisticsNotAvailable- when space statistics are not availableRemoteException- if a communication error occurs
-
getStatistics
Returns statistics repository that contains a map of operation codes toStatisticsContextobjects for all filter operation codes.- Returns:
- map of operation codes to
StatisticsContext - Throws:
StatisticsNotAvailable- when space statistics are not availableRemoteException- if a communication error occurs
-
getHolder
- Throws:
RemoteException
-
getMetricSnapshots
- Parameters:
prefixes- collection of metrics prefixes- Returns:
- map of metrics with their values as map values
- Throws:
RemoteException- Since:
- 12.1
-