Class ScanValve

java.lang.Object
com.jcabi.dynamo.ScanValve
All Implemented Interfaces:
Valve

@Immutable @Loggable(1) public final class ScanValve extends Object implements Valve
Scan-based valve.
Since:
0.1
  • 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 IOException
      Description copied from interface: Valve
      Fetch the first dosage.
      Specified by:
      fetch in interface Valve
      Parameters:
      credentials - Credentials to AWS
      table - Table name
      conditions - Conditions
      keys - 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: Valve
      Count items.
      Specified by:
      count in interface Valve
      Parameters:
      credentials - Credentials to AWS
      table - Table name
      conditions - Conditions
      Returns:
      Total count of the
    • withLimit

      public ScanValve withLimit(int lmt)
      With given limit.
      Parameters:
      lmt - Limit to use
      Returns:
      New query valve
    • withAttributeToGet

      public ScanValve withAttributeToGet(String name)
      With this extra attribute to pre-fetch.
      Parameters:
      name - Name of attribute to pre-load
      Returns:
      New query valve
    • withAttributeToGet

      public ScanValve withAttributeToGet(String... names)
      With these extra attributes to pre-fetch.
      Parameters:
      names - Name of attributes to pre-load
      Returns:
      New query valve