public class AgentRestartCounter extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
AgentRestartCounter.AgentRestartReason |
| Constructor and Description |
|---|
AgentRestartCounter() |
| Modifier and Type | Method and Description |
|---|---|
AgentRestartCounter.AgentRestartReason |
getLastAgentRestartReason()
The reason why the agent was last restarted.
|
int |
getNumberOfRestarts()
Returns the number of times the agent has been restarted since the
beginning of the agent's JVM lifetime.
|
void |
restartedAgent(AgentRestartCounter.AgentRestartReason reason)
This should be called whenever the agent is restated.
|
public AgentRestartCounter.AgentRestartReason getLastAgentRestartReason()
public int getNumberOfRestarts()
reason will be
AgentRestartCounter.AgentRestartReason.PROCESS_START to indicate the agent
was started at JVM startup time.
This will be 0 if the agent JVM process was created but the agent
itself was never started at process start time.
If this value is larger than 1, the agent was restarted for some
reason, e.g. the VM health check thread deemed the agent at
critically low memory and thus restarted the agent in an attempt
to bring the agent back to normal memory usage.public void restartedAgent(AgentRestartCounter.AgentRestartReason reason)
last reason
to the given reason code.reason - the reason why the agent was restartedCopyright © 2008-2014 Red Hat, Inc.. All Rights Reserved.