Interface TelemetryBackend
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
DataLogTelemetryBackend, DiscardTelemetryBackend, HootTelemetryBackend, MockTelemetryBackend, MultiTelemetryBackend, NetworkTablesTelemetryBackend
Interface for telemetry backends.
Implementations registered with TelemetryRegistry must be thread-safe. Backend and
entry methods may be called concurrently, and entry removal or backend closure may overlap a call
already in progress on a previously returned entry.
-
Method Summary
Modifier and TypeMethodDescriptionCreate an entry for the given path.default booleanownsBackend(TelemetryBackend backend) Returns whether this backend is or owns the given backend instance for lifecycle purposes.default voidremoveEntry(String path) Removes an entry for the given path.default booleansharesBackendWith(TelemetryBackend backend) Returns whether this backend shares lifecycle ownership with another backend.Methods inherited from interface AutoCloseable
close
-
Method Details
-
getEntry
Create an entry for the given path.Backend implementations must not throw from this method. Recoverable failures should be reported through
TelemetryRegistry.reportWarning(String, String)and represented with a discard entry.- Parameters:
path- full name- Returns:
- telemetry entry
-
ownsBackend
Returns whether this backend is or owns the given backend instance for lifecycle purposes.Composite backends should override this and recursively check child backends that are closed when this backend is closed. The registry uses this to avoid closing a displaced backend that is now retained by another registered backend.
- Parameters:
backend- backend instance- Returns:
- True if this backend is or owns the given backend
-
removeEntry
Removes an entry for the given path.Backend implementations must not throw from this method.
- Parameters:
path- normalized full name
-