Class OxiaClientGrpc.OxiaClientBlockingStub

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

public static final class OxiaClientGrpc.OxiaClientBlockingStub extends io.grpc.stub.AbstractBlockingStub<OxiaClientGrpc.OxiaClientBlockingStub>
A stub to allow clients to do synchronous 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.OxiaClientBlockingStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions)
      Specified by:
      build in class io.grpc.stub.AbstractStub<OxiaClientGrpc.OxiaClientBlockingStub>
    • getShardAssignments

      public Iterator<ShardAssignments> getShardAssignments(ShardAssignmentsRequest request)
      
       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 WriteResponse write(WriteRequest request)
      
       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
       
    • read

      public Iterator<ReadResponse> read(ReadRequest request)
      
       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 Iterator<ListResponse> list(ListRequest request)
      
       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 Iterator<RangeScanResponse> rangeScan(RangeScanRequest request)
      
       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 Iterator<NotificationBatch> getNotifications(NotificationsRequest request)
    • createSession

      public CreateSessionResponse createSession(CreateSessionRequest request)
       Creates a new client session. Sessions are kept alive by regularly sending
       heartbeats via the KeepAlive rpc.
       
    • keepAlive

      public KeepAliveResponse keepAlive(SessionHeartbeat request)
       Sends a heartbeat to prevent the session from timing out.
       
    • closeSession

      public CloseSessionResponse closeSession(CloseSessionRequest request)
       Closes a session and removes all ephemeral values associated with it.