| Modifier and Type | Method and Description |
|---|---|
void |
addLogToBatch(com.fasterxml.jackson.databind.node.ObjectNode message,
long timeStamp)
Add log to batch to be submitted to telemetry.
|
void |
addLogToBatch(TelemetryData log)
Add log to batch to be submitted to telemetry.
|
int |
bufferSize()
For test use only
|
void |
close()
Close telemetry connector and send any unsubmitted logs
|
static Telemetry |
createTelemetry(Connection conn)
Initialize the telemetry connector
|
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)
Initialize the telemetry connector
|
void |
disableTelemetry()
Disable any use of the client to add/send metrics
|
boolean |
isClosed()
Return whether the client has been closed
|
boolean |
isTelemetryEnabled()
Return whether the client can be used to add/send metrics
|
LinkedList<TelemetryData> |
logBuffer()
For test use only
|
Future<Boolean> |
sendBatchAsync()
Send all cached logs to server
|
boolean |
sendLog(com.fasterxml.jackson.databind.node.ObjectNode message,
long timeStamp)
Send a log to the server, along with any existing logs waiting to be sent
|
boolean |
sendLog(TelemetryData log)
Send a log to the server, along with any existing logs waiting to be sent
|
public boolean isTelemetryEnabled()
public void disableTelemetry()
public static Telemetry createTelemetry(Connection conn, int flushSize)
conn - connection with the session to use for the connectorflushSize - maximum size of telemetry batch before flushpublic static Telemetry createTelemetry(Connection conn)
conn - connection with the session to use for the connectorpublic static Telemetry createTelemetry(SFSession session)
session - session to use for telemetry dumpspublic static Telemetry createTelemetry(SFSession session, int flushSize)
session - session to use for telemetry dumpsflushSize - maximum size of telemetry batch before flushpublic void addLogToBatch(TelemetryData log)
addLogToBatch in interface Telemetrylog - entry to addpublic void addLogToBatch(com.fasterxml.jackson.databind.node.ObjectNode message,
long timeStamp)
message - json node of logtimeStamp - timestamp to use for logpublic void close()
public boolean isClosed()
public Future<Boolean> sendBatchAsync()
TelemetrysendBatchAsync in interface Telemetrypublic boolean sendLog(TelemetryData log) throws IOException
log - entry to sendIOException - if closed or uploading batch failspublic boolean sendLog(com.fasterxml.jackson.databind.node.ObjectNode message,
long timeStamp)
throws IOException
message - json node of logtimeStamp - timestamp to use for logIOException - if closed or uploading batch failspublic int bufferSize()
public LinkedList<TelemetryData> logBuffer()
Copyright © 2020. All rights reserved.