Package io.streamnative.oxia.proto
Interface OxiaClientGrpc.AsyncService
- All Known Implementing Classes:
OxiaClientGrpc.OxiaClientImplBase
- Enclosing class:
- OxiaClientGrpc
public static interface OxiaClientGrpc.AsyncService
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 Summary
Modifier and TypeMethodDescriptiondefault voidcloseSession(CloseSessionRequest request, io.grpc.stub.StreamObserver<CloseSessionResponse> responseObserver) Closes a session and removes all ephemeral values associated with it.default voidcreateSession(CreateSessionRequest request, io.grpc.stub.StreamObserver<CreateSessionResponse> responseObserver) Creates a new client session.default voidgetNotifications(NotificationsRequest request, io.grpc.stub.StreamObserver<NotificationBatch> responseObserver) default voidgetShardAssignments(ShardAssignmentsRequest request, io.grpc.stub.StreamObserver<ShardAssignments> responseObserver) Gets all shard-to-server assignments as a stream.default voidkeepAlive(SessionHeartbeat request, io.grpc.stub.StreamObserver<KeepAliveResponse> responseObserver) Sends a heartbeat to prevent the session from timing out.default voidlist(ListRequest request, io.grpc.stub.StreamObserver<ListResponse> responseObserver) Requests all the keys between a range of keys.default voidrangeScan(RangeScanRequest request, io.grpc.stub.StreamObserver<RangeScanResponse> responseObserver) Requests all the records between a range of keys.default voidread(ReadRequest request, io.grpc.stub.StreamObserver<ReadResponse> responseObserver) Batches get requests.default voidwrite(WriteRequest request, io.grpc.stub.StreamObserver<WriteResponse> responseObserver) Batches put, delete and delete_range requests.default io.grpc.stub.StreamObserver<WriteRequest>writeStream(io.grpc.stub.StreamObserver<WriteResponse> responseObserver) Batches put, delete and delete_range requests.
-
Method Details
-
getShardAssignments
default 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
default 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
default 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
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
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
default 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
default void getNotifications(NotificationsRequest request, io.grpc.stub.StreamObserver<NotificationBatch> responseObserver) -
createSession
default 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
default void keepAlive(SessionHeartbeat request, io.grpc.stub.StreamObserver<KeepAliveResponse> responseObserver) Sends a heartbeat to prevent the session from timing out.
-
closeSession
default void closeSession(CloseSessionRequest request, io.grpc.stub.StreamObserver<CloseSessionResponse> responseObserver) Closes a session and removes all ephemeral values associated with it.
-