Package com.jcabi.dynamo
Class ScanValve
java.lang.Object
com.jcabi.dynamo.ScanValve
- All Implemented Interfaces:
Valve
Scan-based valve.
- Since:
- 0.1
-
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.withAttributeToGet(String name) With this extra attribute to pre-fetch.withAttributeToGet(String... names) With these extra attributes to pre-fetch.withLimit(int lmt) With given limit.
-
Constructor Details
-
ScanValve
public ScanValve()Public ctor.
-
-
Method Details
-
fetch
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
public int count(Credentials credentials, String table, Map<String, software.amazon.awssdk.services.dynamodb.model.Condition> conditions) Description copied from interface:ValveCount items. -
withLimit
With given limit.- Parameters:
lmt- Limit to use- Returns:
- New query valve
-
withAttributeToGet
With this extra attribute to pre-fetch.- Parameters:
name- Name of attribute to pre-load- Returns:
- New query valve
-
withAttributeToGet
With these extra attributes to pre-fetch.- Parameters:
names- Name of attributes to pre-load- Returns:
- New query valve
-