public class WorkerMetricStatsDAO extends Object
| Constructor and Description |
|---|
WorkerMetricStatsDAO(software.amazon.awssdk.services.dynamodb.DynamoDbAsyncClient dynamoDbAsyncClient,
LeaseManagementConfig.WorkerMetricsTableConfig tableConfig,
Long workerMetricsReporterFrequencyMillis) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
deleteMetrics(WorkerMetricStats workerMetrics)
Deletes the WorkerMetricStats entry with conditional check on lastUpdateTime, if the worker has come alive and
updated the lastUpdateTime then we no longer need to perform the deletion.
|
List<WorkerMetricStats> |
getAllWorkerMetricStats()
Performs the scan on the storage and returns list of all workerMetricStats objects.
|
void |
initialize()
Performs initialization of the WorkerMetricStats DAO and table.
|
void |
updateMetrics(WorkerMetricStats workerMetrics)
Updates the workerMetrics for the provided worker, method ignores the null attributes and overrides
the only non-null from .
|
public WorkerMetricStatsDAO(software.amazon.awssdk.services.dynamodb.DynamoDbAsyncClient dynamoDbAsyncClient,
LeaseManagementConfig.WorkerMetricsTableConfig tableConfig,
Long workerMetricsReporterFrequencyMillis)
public void initialize()
throws DependencyException
DependencyExceptionpublic void updateMetrics(WorkerMetricStats workerMetrics)
workerMetrics - : Updated WorkerMetricStats object, resourceStats, workerId and lastUpdateTime are
required fields from public boolean deleteMetrics(WorkerMetricStats workerMetrics)
workerMetrics - WorkerMetricStats that needs to be deleted.public List<WorkerMetricStats> getAllWorkerMetricStats()
Copyright © 2025. All rights reserved.