Class StandardTelemetryDatabase
java.lang.Object
com.pnfsoftware.jeb.client.telemetry.StandardTelemetryDatabase
- All Implemented Interfaces:
ITelemetryDatabase
Standard telemetry database for JEB clients.
-
Constructor Summary
ConstructorsConstructorDescriptionStandardTelemetryDatabase(String dbpath, ITelemetryEndpoint endpoint) Create a new or open an existing JEB telemetry database.StandardTelemetryDatabase(String dbpath, ITelemetryEndpoint endpoint, boolean startDumperThread) Create a new or open an existing JEB telemetry database. -
Method Summary
Modifier and TypeMethodDescriptionbooleanclear()voidclose()Close the telemetry database.booleandump()Dump the database records to an endpoint.protected voidfinalize()intintbooleanConvenience method.booleanConvenience method.booleanConvenience method.booleanRecord a telemetry event with some properties.voidsetDumpPeriod(int dumpPeriodSeconds) voidsetPurgeThreshold(int purgeThreshold) intsize()void
-
Constructor Details
-
StandardTelemetryDatabase
public StandardTelemetryDatabase(String dbpath, ITelemetryEndpoint endpoint) throws IOException, TelemetryException Create a new or open an existing JEB telemetry database. Default dump period: 5 minutes. The dumper thread is not started.- Parameters:
dbpath- database pathendpoint- the telemetry endpoint to submit the telemetry logs- Throws:
IOExceptionTelemetryException
-
StandardTelemetryDatabase
public StandardTelemetryDatabase(String dbpath, ITelemetryEndpoint endpoint, boolean startDumperThread) throws IOException, TelemetryException Create a new or open an existing JEB telemetry database. Default dump period: 5 minutes.- Parameters:
dbpath- database pathendpoint- the telemetry endpoint to submit the telemetry logsstartDumperThread-- Throws:
IOExceptionTelemetryException
-
-
Method Details
-
startDumperThread
public void startDumperThread() -
finalize
-
close
Description copied from interface:ITelemetryDatabaseClose the telemetry database.- Specified by:
closein interfaceITelemetryDatabase- Throws:
TelemetryException
-
setDumpPeriod
public void setDumpPeriod(int dumpPeriodSeconds) -
getDumpPeriod
public int getDumpPeriod() -
setPurgeThreshold
public void setPurgeThreshold(int purgeThreshold) -
getPurgeThreshold
public int getPurgeThreshold() -
record
Description copied from interface:ITelemetryDatabaseConvenience method. Record a telemetry event without properties.- Specified by:
recordin interfaceITelemetryDatabase- Returns:
-
record
Description copied from interface:ITelemetryDatabaseConvenience method. Record a telemetry event with a single property.- Specified by:
recordin interfaceITelemetryDatabase- Returns:
-
record
Description copied from interface:ITelemetryDatabaseConvenience method. Record a telemetry event with two properties.- Specified by:
recordin interfaceITelemetryDatabase- Returns:
-
record
Description copied from interface:ITelemetryDatabaseRecord a telemetry event with some properties. This method should never throw and should execute as quickly as possible.- Specified by:
recordin interfaceITelemetryDatabase- Returns:
-
size
public int size() -
clear
public boolean clear() -
dump
public boolean dump()Dump the database records to an endpoint. Called from separate thread. Do not perform network operations when locking on this object, otherwise normal ops (dump, etc.) will unnecessarily be delayed.- Returns:
-