class SummaryListener extends Object implements RateSummaryListener
Modifier and Type | Field and Description |
---|---|
(package private) static String |
CF |
(package private) static int |
MAX_ROWS |
(package private) static int |
PERIODS |
(package private) static String |
PROP_PERSISTENT |
(package private) static String |
RRD_DIR
note that .jrb files are NOT compatible with .rrd files
|
Constructor and Description |
---|
SummaryListener(Rate r) |
Modifier and Type | Method and Description |
---|---|
void |
add(double totalValue,
long eventCount,
double totalEventTime,
long period) |
(package private) static String |
createName(I2PAppContext ctx,
String wanted)
JRobin can only deal with 20 character data source names, so we need to create a unique,
munged version from the user/developer-visible name.
|
boolean |
equals(Object obj) |
(package private) String |
getBackendName() |
(package private) RrdDb |
getData() |
(package private) String |
getEventName() |
(package private) String |
getName() |
Rate |
getRate() |
(package private) int |
getRows() |
int |
hashCode() |
(package private) long |
now() |
void |
renderPng(OutputStream out) |
void |
renderPng(OutputStream out,
int width,
int height,
boolean hideLegend,
boolean hideGrid,
boolean hideTitle,
boolean showEvents,
int periodCount,
int end,
boolean showCredit)
Single graph.
|
void |
renderPng(OutputStream out,
int width,
int height,
boolean hideLegend,
boolean hideGrid,
boolean hideTitle,
boolean showEvents,
int periodCount,
int end,
boolean showCredit,
SummaryListener lsnr2,
String titleOverride)
Single or two-data-source graph.
|
boolean |
startListening() |
void |
stopListening() |
static final String PROP_PERSISTENT
static final String RRD_DIR
static final String CF
static final int PERIODS
static final int MAX_ROWS
public SummaryListener(Rate r)
public void add(double totalValue, long eventCount, double totalEventTime, long period)
add
in interface RateSummaryListener
totalValue
- sum of all event values in the most recent periodeventCount
- how many events occurredtotalEventTime
- how long the events were running forperiod
- how long this period isstatic String createName(I2PAppContext ctx, String wanted)
public Rate getRate()
public boolean startListening()
public void stopListening()
public void renderPng(OutputStream out, int width, int height, boolean hideLegend, boolean hideGrid, boolean hideTitle, boolean showEvents, int periodCount, int end, boolean showCredit) throws IOException
end
- number of periods before nowIOException
public void renderPng(OutputStream out, int width, int height, boolean hideLegend, boolean hideGrid, boolean hideTitle, boolean showEvents, int periodCount, int end, boolean showCredit, SummaryListener lsnr2, String titleOverride) throws IOException
lsnr2
- 2nd data source to plot on same graph, or null. Not recommended for events.titleOverride
- If non-null, overrides the titleIOException
public void renderPng(OutputStream out) throws IOException
IOException
String getName()
String getEventName()
RrdDb getData()
long now()
String getBackendName()
int getRows()