Package com.jcabi.dynamo.retry
Class ReValve
java.lang.Object
com.jcabi.dynamo.retry.ReValve
- All Implemented Interfaces:
Valve
Valve that retries on failure.
- Since:
- 0.9
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcount(Credentials credentials, String table, Map<String, software.amazon.awssdk.services.dynamodb.model.Condition> conditions) Count items.fetch(Credentials credentials, String table, Map<String, software.amazon.awssdk.services.dynamodb.model.Condition> conditions, Collection<String> keys) Fetch the first dosage.
-
Constructor Details
-
ReValve
Public ctor.- Parameters:
valve- Origin valve
-
-
Method Details
-
fetch
@RetryOnFailure(verbose=false, delay=5L, unit=SECONDS) public Dosage fetch(Credentials credentials, String table, Map<String, software.amazon.awssdk.services.dynamodb.model.Condition> conditions, Collection<String> keys) throws IOExceptionDescription copied from interface:ValveFetch the first dosage.- Specified by:
fetchin interfaceValve- Parameters:
credentials- Credentials to AWStable- Table nameconditions- Conditionskeys- Keys of the table- Returns:
- Dosage
- Throws:
IOException- In case of DynamoDB failure
-
count
@RetryOnFailure(verbose=false, delay=5L, unit=SECONDS) public int count(Credentials credentials, String table, Map<String, software.amazon.awssdk.services.dynamodb.model.Condition> conditions) throws IOExceptionDescription copied from interface:ValveCount items.- Specified by:
countin interfaceValve- Parameters:
credentials- Credentials to AWStable- Table nameconditions- Conditions- Returns:
- Total count of the
- Throws:
IOException- In case of DynamoDB failure
-