|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectsk.baka.webvm.misc.BackgroundService
sk.baka.webvm.analyzer.HistorySampler
public final class HistorySampler
Samples the VM history regularly. You need to invoke BackgroundService.start() to start the sampler, BackgroundService.stop() to stop it. Thread-safe.
| Field Summary | |
|---|---|
static SamplerConfig |
HISTORY_PROBLEMS
Default Problems history. |
static SamplerConfig |
HISTORY_VMSTAT
Default VMStat history. |
| Fields inherited from class sk.baka.webvm.misc.BackgroundService |
|---|
maxThreads, name |
| Constructor Summary | |
|---|---|
HistorySampler(ProblemAnalyzer analyzer)
Creates new sampler instance with default values. |
|
HistorySampler(SamplerConfig vmstatConfig,
SamplerConfig problemConfig,
ProblemAnalyzer analyzer)
Creates new sampler instance. |
|
| Method Summary | |
|---|---|
void |
configure(Config config)
Sets the new configuration file. |
List<List<ProblemReport>> |
getProblemHistory()
Returns a snapshot view over the problem history. |
List<HistorySample> |
getVmstatHistory()
Returns a snapshot of the history values. |
protected void |
started(ScheduledExecutorService executor)
Invoked when the service is started. |
protected void |
stopped()
Invoked after the service has been stopped. |
| Methods inherited from class sk.baka.webvm.misc.BackgroundService |
|---|
getExecutor, newDaemonFactory, start, stop |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final SamplerConfig HISTORY_VMSTAT
public static final SamplerConfig HISTORY_PROBLEMS
| Constructor Detail |
|---|
public HistorySampler(ProblemAnalyzer analyzer)
analyzer - a configured instance of the analyzer
public HistorySampler(SamplerConfig vmstatConfig,
SamplerConfig problemConfig,
ProblemAnalyzer analyzer)
vmstatConfig - the vmstat sampler configproblemConfig - the problem sampler configanalyzer - a configured instance of the analyzer| Method Detail |
|---|
public void configure(Config config)
config - the new config file.protected void started(ScheduledExecutorService executor)
BackgroundService
started in class BackgroundServiceexecutor - executes tasks.protected void stopped()
BackgroundService
stopped in class BackgroundServicepublic List<HistorySample> getVmstatHistory()
public List<List<ProblemReport>> getProblemHistory()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||