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 TypeMethodDescriptionboolean
clear()
void
close()
Close the telemetry database.boolean
dump()
Dump the database records to an endpoint.protected void
finalize()
int
int
boolean
Convenience method.boolean
Convenience method.boolean
Convenience method.boolean
Record a telemetry event with some properties.void
setDumpPeriod
(int dumpPeriodSeconds) void
setPurgeThreshold
(int purgeThreshold) int
size()
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:
IOException
TelemetryException
-
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:
IOException
TelemetryException
-
-
Method Details
-
startDumperThread
public void startDumperThread() -
finalize
-
close
Description copied from interface:ITelemetryDatabase
Close the telemetry database.- Specified by:
close
in 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:ITelemetryDatabase
Convenience method. Record a telemetry event without properties.- Specified by:
record
in interfaceITelemetryDatabase
- Returns:
-
record
Description copied from interface:ITelemetryDatabase
Convenience method. Record a telemetry event with a single property.- Specified by:
record
in interfaceITelemetryDatabase
- Returns:
-
record
Description copied from interface:ITelemetryDatabase
Convenience method. Record a telemetry event with two properties.- Specified by:
record
in interfaceITelemetryDatabase
- Returns:
-
record
Description copied from interface:ITelemetryDatabase
Record a telemetry event with some properties. This method should never throw and should execute as quickly as possible.- Specified by:
record
in 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:
-