Class FailedObjectStoreOperationsCounter
- java.lang.Object
-
- app.coronawarn.server.services.distribution.objectstore.FailedObjectStoreOperationsCounter
-
@Component public class FailedObjectStoreOperationsCounter extends Object
Maintains the count and maximum number of failed object store operations in a thread-safe manner.
-
-
Constructor Summary
Constructors Constructor Description FailedObjectStoreOperationsCounter(DistributionServiceConfig distributionServiceConfig)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
incrementAndCheckThreshold(ObjectStoreOperationFailedException cause)
Increments the internal failed operations counter and rethrows the specified exception if the configured maximum number of failed object store operation was exceeded.
-
-
-
Constructor Detail
-
FailedObjectStoreOperationsCounter
public FailedObjectStoreOperationsCounter(DistributionServiceConfig distributionServiceConfig)
-
-
Method Detail
-
incrementAndCheckThreshold
public void incrementAndCheckThreshold(ObjectStoreOperationFailedException cause)
Increments the internal failed operations counter and rethrows the specified exception if the configured maximum number of failed object store operation was exceeded.- Parameters:
cause
- TheObjectStoreOperationFailedException
that is associated with the failed operation.
-
-