com.amazonaws.services.kinesis.clientlibrary.proxies.ShardListWrappingShardClosureVerificationResponse Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of amazon-kinesis-client Show documentation
Show all versions of amazon-kinesis-client Show documentation
The Amazon Kinesis Client Library for Java enables Java developers to easily consume and process data
from Amazon Kinesis.
package com.amazonaws.services.kinesis.clientlibrary.proxies;
import com.amazonaws.services.kinesis.model.Shard;
import lombok.Getter;
import java.util.List;
/**
* Implementation of ShardClosureVerificationResponse that also wraps the latest results
* from IKinesisProxy.getShardList() in it.
*/
public class ShardListWrappingShardClosureVerificationResponse implements ShardClosureVerificationResponse {
private final boolean isShardClosed;
@Getter
private final List latestShards;
/**
* Used to capture response from KinesisProxy.verifyShardClosure method.
* @param isShardClosed If the provided shardId corresponds to a shard that was verified as closed.
* @param latestShards Result returned by KinesisProxy.getShardList() used for verification.
*/
public ShardListWrappingShardClosureVerificationResponse(boolean isShardClosed, List latestShards) {
this.isShardClosed = isShardClosed;
this.latestShards = latestShards;
}
@Override public boolean isShardClosed() {
return isShardClosed;
}
}