Class KinesisStreamProxy

    • Constructor Detail

      • KinesisStreamProxy

        public KinesisStreamProxy​(software.amazon.awssdk.services.kinesis.KinesisClient kinesisClient,
                                  software.amazon.awssdk.http.SdkHttpClient httpClient)
    • Method Detail

      • getStreamDescriptionSummary

        public software.amazon.awssdk.services.kinesis.model.StreamDescriptionSummary getStreamDescriptionSummary​(String streamArn)
        Description copied from interface: StreamProxy
        Obtains stream metadata.
        Specified by:
        getStreamDescriptionSummary in interface StreamProxy
        Parameters:
        streamArn - the ARN of the stream
        Returns:
        stream information.
      • listShards

        public List<software.amazon.awssdk.services.kinesis.model.Shard> listShards​(String streamArn,
                                                                                    ListShardsStartingPosition startingPosition)
        Description copied from interface: StreamProxy
        Obtains the shards associated with a given stream.
        Specified by:
        listShards in interface StreamProxy
        Parameters:
        streamArn - the ARN of the stream
        startingPosition - starting position for shard discovery request. Used to skip already discovered/not used shards
        Returns:
        shard list
      • getRecords

        public software.amazon.awssdk.services.kinesis.model.GetRecordsResponse getRecords​(String streamArn,
                                                                                           String shardId,
                                                                                           StartingPosition startingPosition,
                                                                                           int maxRecordsToGet)
        Description copied from interface: StreamProxy
        Retrieves records from the stream.
        Specified by:
        getRecords in interface StreamProxy
        Parameters:
        streamArn - the ARN of the stream
        shardId - the shard to subscribe from
        startingPosition - the starting position to read from
        maxRecordsToGet - the maximum amount of records to retrieve for this batch
        Returns:
        the response with records. Includes both the returned records and the subsequent shard iterator to use.
      • registerStreamConsumer

        public software.amazon.awssdk.services.kinesis.model.RegisterStreamConsumerResponse registerStreamConsumer​(String streamArn,
                                                                                                                   String consumerName)
        Description copied from interface: StreamProxy
        Registers an enhanced fan-out consumer against the stream.
        Specified by:
        registerStreamConsumer in interface StreamProxy
        Parameters:
        streamArn - the ARN of the stream
        consumerName - the consumerName
        Returns:
        the register stream consumer response
      • deregisterStreamConsumer

        public software.amazon.awssdk.services.kinesis.model.DeregisterStreamConsumerResponse deregisterStreamConsumer​(String consumerArn)
        Description copied from interface: StreamProxy
        De-registers an enhanced fan-out consumer against the stream.
        Specified by:
        deregisterStreamConsumer in interface StreamProxy
        Parameters:
        consumerArn - the ARN of the consumer to deregister
        Returns:
        the de-register stream consumer response
      • describeStreamConsumer

        public software.amazon.awssdk.services.kinesis.model.DescribeStreamConsumerResponse describeStreamConsumer​(String streamArn,
                                                                                                                   String consumerName)
        Description copied from interface: StreamProxy
        Describe stream consumer.
        Specified by:
        describeStreamConsumer in interface StreamProxy
        Parameters:
        streamArn - the ARN of the Kinesis stream
        consumerName - the name of the Kinesis consumer
        Returns:
        the describe stream consumer response