public class Telemetry extends Object
Telemetry Service Interface
| Modifier and Type | Method and Description |
|---|---|
void |
addLogToBatch(com.fasterxml.jackson.databind.node.ObjectNode message,
long timeStamp) |
void |
addLogToBatch(TelemetryData log)
Add a log data to batch
|
int |
bufferSize()
For test use only
|
void |
close()
close telemetry connector, send all cached logs
|
static Telemetry |
createTelemetry(Connection conn) |
static Telemetry |
createTelemetry(Connection conn,
int flushSize)
Initialize the telemetry connector
|
static Telemetry |
createTelemetry(SFSession session)
Initialize the telemetry connector
|
static Telemetry |
createTelemetry(SFSession session,
int flushSize) |
void |
disableTelemetry() |
boolean |
isClosed() |
boolean |
isTelemetryEnabled() |
LinkedList<TelemetryData> |
logBuffer()
For test use only
|
boolean |
sendBatch()
Send all cached logs to server
|
boolean |
sendLog(com.fasterxml.jackson.databind.node.ObjectNode message,
long timeStamp) |
boolean |
sendLog(TelemetryData log)
Send a log data to server
|
void |
tryAddLogToBatch(TelemetryData log)
Same behaviour as addLogToBatch, but suppress exceptions
|
public boolean isTelemetryEnabled()
public void disableTelemetry()
public static Telemetry createTelemetry(Connection conn, int flushSize)
conn - public static Telemetry createTelemetry(Connection conn)
public static Telemetry createTelemetry(SFSession session)
session - public void addLogToBatch(TelemetryData log) throws IOException
IOExceptionpublic void addLogToBatch(com.fasterxml.jackson.databind.node.ObjectNode message,
long timeStamp)
throws IOException
IOExceptionpublic void tryAddLogToBatch(TelemetryData log)
public void close()
throws IOException
IOExceptionpublic boolean isClosed()
public boolean sendBatch()
throws IOException
IOExceptionpublic boolean sendLog(TelemetryData log) throws IOException
IOExceptionpublic boolean sendLog(com.fasterxml.jackson.databind.node.ObjectNode message,
long timeStamp)
throws IOException
IOExceptionpublic int bufferSize()
public LinkedList<TelemetryData> logBuffer()
Copyright © 2018. All rights reserved.