Class ManagementApiHandler
java.lang.Object
com.loomcache.server.management.ManagementApiHandler
Management REST API handler for the lightweight web UI dashboard.
Provides endpoints for:
- Cluster topology (node health, partition ownership, leaders)
- Data structure browser (list structures, browse entries with pagination)
- Metrics aggregation (ops/sec, latency, memory)
- Configuration viewer
All responses are JSON. Thread-safe.
- Since:
- 2.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidroute(@NonNull HttpExchange exchange, @NonNull String path) Route a management API request.voidserveDashboard(@NonNull HttpExchange exchange) Serve the embedded HTML dashboard page.
-
Constructor Details
-
ManagementApiHandler
public ManagementApiHandler(@NonNull DataStructureRegistry registry, int instanceNumber, @Nullable Supplier<Map<String, Object>> clusterTopologySupplier, @Nullable Supplier<Map<String, Object>> metricsSupplier, @Nullable Supplier<Map<String, Object>> configSupplier) - Parameters:
registry- the data structure registryinstanceNumber- the node instance numberclusterTopologySupplier- optional supplier for cluster topology infometricsSupplier- optional supplier for metricsconfigSupplier- optional supplier for configuration
-
-
Method Details
-
route
Route a management API request.- Parameters:
exchange- the HTTP exchangepath- the request path (after /api/v1/management/)- Throws:
IOException
-
serveDashboard
Serve the embedded HTML dashboard page.- Throws:
IOException
-