net.i2p.router.web
Class SummaryListener
java.lang.Object
net.i2p.router.web.SummaryListener
- All Implemented Interfaces:
- RateSummaryListener
class SummaryListener
- extends Object
- implements RateSummaryListener
Creates and updates the in-memory or on-disk RRD database,
and provides methods to generate graphs of the data
- Since:
- 0.6.1.13
Method Summary |
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,
boolean showCredit)
|
boolean |
startListening()
|
void |
stopListening()
|
PROP_PERSISTENT
static final String PROP_PERSISTENT
- See Also:
- Constant Field Values
RRD_DIR
static final String RRD_DIR
- note that .jrb files are NOT compatible with .rrd files
- See Also:
- Constant Field Values
CF
static final String CF
- See Also:
- Constant Field Values
PERIODS
static final int PERIODS
- See Also:
- Constant Field Values
SummaryListener
public SummaryListener(Rate r)
add
public void add(double totalValue,
long eventCount,
double totalEventTime,
long period)
- Specified by:
add
in interface RateSummaryListener
- Parameters:
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 is
createName
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.
getRate
public Rate getRate()
startListening
public boolean startListening()
- Returns:
- success
stopListening
public void stopListening()
renderPng
public void renderPng(OutputStream out,
int width,
int height,
boolean hideLegend,
boolean hideGrid,
boolean hideTitle,
boolean showEvents,
int periodCount,
boolean showCredit)
throws IOException
- Throws:
IOException
renderPng
public void renderPng(OutputStream out)
throws IOException
- Throws:
IOException
getName
String getName()
getEventName
String getEventName()
getData
RrdDb getData()
now
long now()
getBackendName
String getBackendName()
- Since:
- 0.8.7
getRows
int getRows()
- Since:
- 0.8.7
equals
public boolean equals(Object obj)
- Overrides:
equals
in class Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object