Class KinesisSinks.Builder<T>

Type Parameters:
T - Type of items ingested by this sink
Enclosing class:

public static final class KinesisSinks.Builder<T>
extends Object
Fluent builder for constructing the Kinesis sink and setting its configuration parameters.
  • Method Details

    • withEndpoint

      @Nonnull public KinesisSinks.Builder<T> withEndpoint​(@Nullable String endpoint)
      Specifies the AWS Kinesis endpoint (URL of the entry point for the AWS web service) to connect to. The general syntax of these endpoint URLs is "protocol://", so for example, for Kinesis, for the us-west-2 region, we could have "". For local testing, it might be "http://localhost:4566".

      If not specified (or specified as null), the default endpoint for the specified region will be used.

    • withRegion

      @Nonnull public KinesisSinks.Builder<T> withRegion​(@Nullable String region)
      Specifies the AWS Region (collection of AWS resources in a geographic area) to connect to. Region names are of form "us-west-1", "eu-central-1" and so on.

      If not specified (or specified as null), the default region set via external means will be used (either from your local .aws/config file or the AWS_REGION environment variable). If no such default is set, then "us-east-1" will be used.

    • withCredentials

      @Nonnull public KinesisSinks.Builder<T> withCredentials​(@Nullable String accessKey, @Nullable String secretKey)
      Specifies the AWS credentials to use for authentication purposes.

      If not specified (or specified as null), then keys specified via external means will be used. This can mean the local .aws/credentials file or the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environmental variables.

      Either both keys must be set to non-null values or neither.

    • withRetryStrategy

      @Nonnull public KinesisSinks.Builder<T> withRetryStrategy​(@Nonnull RetryStrategy retryStrategy)
      Specifies how the source should behave when reading data from the stream fails. The default behavior retries the read operation indefinitely, but after an exponentially increasing delay, it starts with 100 milliseconds and doubles on each subsequent failure. A successful read resets it. The delay is capped at 3 seconds.
    • build

      @Nonnull public Sink<T> build()
      Construct the sink based on the options provided so far.