Class OxiaClientGrpc.OxiaClientStub

java.lang.Object
io.grpc.stub.AbstractStub<S>
io.grpc.stub.AbstractAsyncStub<OxiaClientGrpc.OxiaClientStub>
io.streamnative.oxia.proto.OxiaClientGrpc.OxiaClientStub
Enclosing class:
OxiaClientGrpc

public static final class OxiaClientGrpc.OxiaClientStub extends io.grpc.stub.AbstractAsyncStub<OxiaClientGrpc.OxiaClientStub>
A stub to allow clients to do asynchronous rpc calls to service OxiaClient.

 Oxia service that allows clients to discover shard-to-server assignments and
 submit batches of requests.
 Clients should connect to a random server to discover the shard-to-server
 assignments and then send the actual batched requests to the appropriate
 shard leader. In the future, this may be handled server-side in a proxy
 layer to allows clients to not be concerned with sharding.
 
  • Method Details

    • build

      protected OxiaClientGrpc.OxiaClientStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions)
      Specified by:
      build in class io.grpc.stub.AbstractStub<OxiaClientGrpc.OxiaClientStub>
    • getShardAssignments

      public void getShardAssignments(ShardAssignmentsRequest request, io.grpc.stub.StreamObserver<ShardAssignments> responseObserver)
      
       Gets all shard-to-server assignments as a stream. Each set of assignments
       in the response stream will contain all the assignments to bring the client
       up to date. For example, if a shard is split, the stream will return a
       single response containing all the new shard assignments as opposed to
       multiple stream responses, each containing a single shard assignment.
       Clients should connect to a single random server which will stream the
       assignments for all shards on all servers.
       
    • write

      public void write(WriteRequest request, io.grpc.stub.StreamObserver<WriteResponse> responseObserver)
      
       Batches put, delete and delete_range requests.
       Clients should send this request to the shard leader. In the future,
       this may be handled server-side in a proxy layer.
       Deprecated
       
    • writeStream

      public io.grpc.stub.StreamObserver<WriteRequest> writeStream(io.grpc.stub.StreamObserver<WriteResponse> responseObserver)
      
       Batches put, delete and delete_range requests.
       Clients should send this request to the shard leader. In the future,
       this may be handled server-side in a proxy layer.
       
    • read

      public void read(ReadRequest request, io.grpc.stub.StreamObserver<ReadResponse> responseObserver)
      
       Batches get requests.
       Clients should send this request to the shard leader. In the future,
       this may be handled server-side in a proxy layer.
       
    • list

      public void list(ListRequest request, io.grpc.stub.StreamObserver<ListResponse> responseObserver)
      
       Requests all the keys between a range of keys.
       Clients should send an equivalent request to all respective shards,
       unless a particular partition key was specified.
       
    • rangeScan

      public void rangeScan(RangeScanRequest request, io.grpc.stub.StreamObserver<RangeScanResponse> responseObserver)
      
       Requests all the records between a range of keys.
       Clients should send an equivalent request to all respective shards,
       unless a particular partition key was specified.
       
    • getNotifications

      public void getNotifications(NotificationsRequest request, io.grpc.stub.StreamObserver<NotificationBatch> responseObserver)
    • createSession

      public void createSession(CreateSessionRequest request, io.grpc.stub.StreamObserver<CreateSessionResponse> responseObserver)
       Creates a new client session. Sessions are kept alive by regularly sending
       heartbeats via the KeepAlive rpc.
       
    • keepAlive

      public void keepAlive(SessionHeartbeat request, io.grpc.stub.StreamObserver<KeepAliveResponse> responseObserver)
       Sends a heartbeat to prevent the session from timing out.
       
    • closeSession

      public void closeSession(CloseSessionRequest request, io.grpc.stub.StreamObserver<CloseSessionResponse> responseObserver)
       Closes a session and removes all ephemeral values associated with it.