public class

StandardTelemetryDatabase

extends Object
implements ITelemetryDatabase
java.lang.Object
   ↳ com.pnfsoftware.jeb.client.telemetry.StandardTelemetryDatabase

Class Overview

Standard telemetry database for JEB clients.

Summary

Public Constructors
StandardTelemetryDatabase(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.
Public Methods
synchronized boolean clear()
synchronized void close()
Close the telemetry database.
boolean dump()
Dump the database records to an endpoint.
int getDumpPeriod()
int getPurgeThreshold()
boolean record(String eventName, String key0, String value0)
Convenience method.
boolean record(String eventName)
Convenience method.
boolean record(String eventName, String key0, String value0, String key1, String value1)
Convenience method.
synchronized boolean record(String eventName, Map<String, String> properties)
Record a telemetry event with some properties.
void setDumpPeriod(int dumpPeriodSeconds)
void setPurgeThreshold(int purgeThreshold)
synchronized int size()
void startDumperThread()
Protected Methods
void finalize()
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.pnfsoftware.jeb.client.telemetry.ITelemetryDatabase

Public Constructors

public StandardTelemetryDatabase (String dbpath, ITelemetryEndpoint endpoint)

Create a new or open an existing JEB telemetry database. Default dump period: 5 minutes. The dumper thread is not started.

Parameters
dbpath database path
endpoint the telemetry endpoint to submit the telemetry logs
Throws
IOException
TelemetryException
IOException

public StandardTelemetryDatabase (String dbpath, ITelemetryEndpoint endpoint, boolean startDumperThread)

Create a new or open an existing JEB telemetry database. Default dump period: 5 minutes.

Parameters
dbpath database path
endpoint the telemetry endpoint to submit the telemetry logs
Throws
IOException
TelemetryException
IOException

Public Methods

public synchronized boolean clear ()

public synchronized void close ()

Close the telemetry database.

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.

public int getDumpPeriod ()

public int getPurgeThreshold ()

public boolean record (String eventName, String key0, String value0)

Convenience method. Record a telemetry event with a single property.

public boolean record (String eventName)

Convenience method. Record a telemetry event without properties.

public boolean record (String eventName, String key0, String value0, String key1, String value1)

Convenience method. Record a telemetry event with two properties.

public synchronized boolean record (String eventName, Map<String, String> properties)

Record a telemetry event with some properties. This method should never throw and should execute as quickly as possible.

public void setDumpPeriod (int dumpPeriodSeconds)

public void setPurgeThreshold (int purgeThreshold)

public synchronized int size ()

public void startDumperThread ()

Protected Methods

protected void finalize ()

Throws
Throwable