| 构造器和说明 |
|---|
Stats()
Probably, you don't need to create Stats unless you are writing unit tests.
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
clearAll() |
protected Map<String,Object> |
collectReportData() |
protected StatsEntry |
get(String name,
String method) |
Queue<Boolean> |
getClearStatsQueue() |
static Stats |
getInstance() |
BlockingQueue<Map<String,Object>> |
getMessageToRunnerQueue() |
Queue<RequestFailure> |
getReportFailureQueue() |
Queue<RequestSuccess> |
getReportSuccessQueue() |
protected StatsEntry |
getTotal() |
void |
logError(String method,
String name,
String error) |
void |
logRequest(String method,
String name,
long responseTime,
long contentLength) |
void |
run()
User code reports successful and failed records to Stats.
|
Map<String,Map<String,Object>> |
serializeErrors() |
protected List |
serializeStats() |
void |
start() |
void |
stop() |
void |
wakeMeUp() |
public Stats()
public static Stats getInstance()
public void start()
public void stop()
public Queue<RequestSuccess> getReportSuccessQueue()
public Queue<RequestFailure> getReportFailureQueue()
public BlockingQueue<Map<String,Object>> getMessageToRunnerQueue()
public void wakeMeUp()
public void run()
protected StatsEntry getTotal()
protected StatsEntry get(String name, String method)
public void logRequest(String method, String name, long responseTime, long contentLength)
public void clearAll()
protected List serializeStats()
Copyright © 2018. All rights reserved.