Package s2.client

Class BasinClient

java.lang.Object
s2.client.BaseClient
s2.client.BasinClient
All Implemented Interfaces:
AutoCloseable
Direct Known Subclasses:
StreamClient

public class BasinClient extends BaseClient
Client for basin-level operations.
  • Constructor Details

  • Method Details

    • listStreams

      public com.google.common.util.concurrent.ListenableFuture<Paginated<StreamInfo>> listStreams(ListStreamsRequest listStreamsRequest)
      List streams within the basin.
      Parameters:
      listStreamsRequest - the list streams request
      Returns:
      future of a paginated list of stream infos
    • createStream

      public com.google.common.util.concurrent.ListenableFuture<StreamInfo> createStream(CreateStreamRequest createStreamRequest)
      Create a new stream within this basin.
      Parameters:
      createStreamRequest - the create stream request
      Returns:
      future of the resulting stream info
    • deleteStream

      public com.google.common.util.concurrent.ListenableFuture<Void> deleteStream(String streamName)
      Delete a stream.

      Stream deletion is asynchronous, and may take a few minutes to complete.

      Parameters:
      streamName - the stream name
      Returns:
      future representing the completion of this action
    • getStreamConfig

      public com.google.common.util.concurrent.ListenableFuture<StreamConfig> getStreamConfig(String streamName)
      Get current config of a stream.
      Parameters:
      streamName - the stream name
      Returns:
      future of the stream config
    • reconfigureStream

      public com.google.common.util.concurrent.ListenableFuture<StreamConfig> reconfigureStream(ReconfigureStreamRequest reconfigureStreamRequest)
      Reconfigure an existing stream.
      Parameters:
      reconfigureStreamRequest - the reconfigure stream request
      Returns:
      future of the resulting stream config
    • streamClient

      public StreamClient streamClient(String streamName)
      Create a StreamClient for interacting with stream-level RPCs.
      Parameters:
      streamName - the stream name
      Returns:
      the stream client