All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.kinesis.clientlibrary.proxies.ShardListWrappingShardClosureVerificationResponse Maven / Gradle / Ivy

Go to download

The Amazon Kinesis Client Library for Java enables Java developers to easily consume and process data from Amazon Kinesis.

There is a newer version: 1.15.2
Show newest version
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;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy