Class FileDescriptorCollector
java.lang.Object
io.fluxzero.sdk.tracking.metrics.host.collectors.FileDescriptorCollector
- All Implemented Interfaces:
MetricCollector<FileDescriptorMetrics>
public class FileDescriptorCollector
extends Object
implements MetricCollector<FileDescriptorMetrics>
Collector for file descriptor metrics (Unix/Linux only).
Uses the com.sun.management.UnixOperatingSystemMXBean extension.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncollect()Collects metrics.booleanChecks if this collector is available on the current platform.
-
Constructor Details
-
FileDescriptorCollector
public FileDescriptorCollector()
-
-
Method Details
-
collect
Description copied from interface:MetricCollectorCollects metrics.- Specified by:
collectin interfaceMetricCollector<FileDescriptorMetrics>- Returns:
- an Optional containing the collected metrics, or empty if collection failed or the metrics are not available on this platform
-
isAvailable
public boolean isAvailable()Description copied from interface:MetricCollectorChecks if this collector is available on the current platform.This method should return quickly and may cache its result.
- Specified by:
isAvailablein interfaceMetricCollector<FileDescriptorMetrics>- Returns:
- true if this collector can collect metrics on the current platform
-