public class ServerIndicator extends Object
Constructor and Description |
---|
ServerIndicator(long directMemUsed,
long heapMax,
long heapUsed,
double cpuLoad,
long totalJVMPauseTimeMS,
long pitTotalJVMPauseTimeMS,
long rpcQueueSize,
long snapshotTimeMS) |
ServerIndicator(ServerIndicator serverIndicator) |
ServerIndicator(ServerIndicator serverIndicator,
int multiple)
The scaled server indicator according to the multiple.
|
Modifier and Type | Method and Description |
---|---|
void |
addition(ServerIndicator serverIndicator)
Addition the server indicator object.
|
static ServerIndicator |
createFromMetrics(long prevTotalJVMPauseTime)
Creates a server indicator based on current status.
|
static ServerIndicator |
createThresholdIndicator(long directMemUsed,
double ratioOfUsedHeap,
double cpuLoad,
long totalJVMPauseTimeMS,
long rpcQueueSize)
Creates a threshold indicator object, the parameters are set according the input values.
|
double |
getCpuLoad() |
long |
getDirectMemUsed() |
long |
getHeapMax() |
long |
getHeapUsed() |
long |
getPitTimeMS() |
long |
getPITTotalJVMPauseTimeMS() |
long |
getRpcQueueSize() |
static long |
getSystemTotalJVMPauseTime() |
long |
getTotalJVMPauseTimeMS() |
void |
reduction(ServerIndicator serverIndicator)
Gets the server indicator after reducing the serverIndicator.
|
void |
setPitTimeMS(long pitTimeMS)
Sets the pit time.
|
String |
toString() |
public ServerIndicator(long directMemUsed, long heapMax, long heapUsed, double cpuLoad, long totalJVMPauseTimeMS, long pitTotalJVMPauseTimeMS, long rpcQueueSize, long snapshotTimeMS)
directMemUsed
- the allocated direct memoryheapMax
- the max heapheapUsed
- the used heapcpuLoad
- the cpu loadtotalJVMPauseTimeMS
- the total JVM pause time since previous PITpitTotalJVMPauseTimeMS
- the pit total JVM pause timerpcQueueSize
- the pit rpc queue sizesnapshotTimeMS
- the pit timepublic ServerIndicator(ServerIndicator serverIndicator)
serverIndicator
- the server indicatorpublic ServerIndicator(ServerIndicator serverIndicator, int multiple)
serverIndicator
- the base server indicatormultiple
- the timespublic static long getSystemTotalJVMPauseTime()
public static ServerIndicator createFromMetrics(long prevTotalJVMPauseTime)
prevTotalJVMPauseTime
- the previous total JVM pause timepublic static ServerIndicator createThresholdIndicator(long directMemUsed, double ratioOfUsedHeap, double cpuLoad, long totalJVMPauseTimeMS, long rpcQueueSize)
directMemUsed
- the used direct memratioOfUsedHeap
- the ratio of used heapcpuLoad
- the cpu loadtotalJVMPauseTimeMS
- the total JVM pause timerpcQueueSize
- the rpc queue sizepublic long getDirectMemUsed()
public long getHeapMax()
public long getHeapUsed()
public double getCpuLoad()
public long getTotalJVMPauseTimeMS()
public long getPITTotalJVMPauseTimeMS()
public long getRpcQueueSize()
public long getPitTimeMS()
public void setPitTimeMS(long pitTimeMS)
pitTimeMS
- the pit timepublic void addition(ServerIndicator serverIndicator)
serverIndicator
- the server indicatorpublic void reduction(ServerIndicator serverIndicator)
serverIndicator
- the base server indicatorCopyright © 2023. All Rights Reserved.