Example usage for com.amazonaws.services.dynamodbv2.model ShardIteratorType AFTER_SEQUENCE_NUMBER

List of usage examples for com.amazonaws.services.dynamodbv2.model ShardIteratorType AFTER_SEQUENCE_NUMBER

Introduction

In this page you can find the example usage for com.amazonaws.services.dynamodbv2.model ShardIteratorType AFTER_SEQUENCE_NUMBER.

Prototype

ShardIteratorType AFTER_SEQUENCE_NUMBER

To view the source code for com.amazonaws.services.dynamodbv2.model ShardIteratorType AFTER_SEQUENCE_NUMBER.

Click Source Link

Usage

From source file:dynamok.source.DynamoDbSourceTask.java

License:Apache License

private GetShardIteratorRequest getShardIteratorRequest(String shardId, String streamArn, String seqNum) {
    final GetShardIteratorRequest req = new GetShardIteratorRequest();
    req.setShardId(shardId);/* w w w.  j  av a 2s .  com*/
    req.setStreamArn(streamArn);
    if (seqNum == null) {
        req.setShardIteratorType(ShardIteratorType.TRIM_HORIZON);
    } else {
        req.setShardIteratorType(ShardIteratorType.AFTER_SEQUENCE_NUMBER);
        req.setSequenceNumber(seqNum);
    }
    return req;
}