Class OctopusGrpc.OctopusStub
java.lang.Object
io.grpc.stub.AbstractStub<OctopusGrpc.OctopusStub>
io.grpc.stub.AbstractAsyncStub<OctopusGrpc.OctopusStub>
studio.o7.octopus.sdk.v1.OctopusGrpc.OctopusStub
- Enclosing class:
OctopusGrpc
public static final class OctopusGrpc.OctopusStub
extends io.grpc.stub.AbstractAsyncStub<OctopusGrpc.OctopusStub>
A stub to allow clients to do asynchronous rpc calls to service Octopus.
-
Nested Class Summary
Nested classes/interfaces inherited from class io.grpc.stub.AbstractStub
io.grpc.stub.AbstractStub.StubFactory<T> -
Method Summary
Modifier and TypeMethodDescriptionprotected OctopusGrpc.OctopusStubbuild(io.grpc.Channel channel, io.grpc.CallOptions callOptions) voidStores an object on key in the database and returns the stored version, including the revision and ID.voidget(GetRequest request, io.grpc.stub.StreamObserver<GetResponse> responseObserver) Retrieves only one existing entry from the database matching a key.io.grpc.stub.StreamObserver<ListenMessage> Bidirectional stream for real-time updates.voidquery(QueryRequest request, io.grpc.stub.StreamObserver<QueryResponse> responseObserver) Retrieves existing entries from the database matching a key pattern.voidStores an object on key.Methods inherited from class io.grpc.stub.AbstractAsyncStub
newStub, newStubMethods inherited from class io.grpc.stub.AbstractStub
getCallOptions, getChannel, withCallCredentials, withChannel, withCompression, withDeadline, withDeadlineAfter, withDeadlineAfter, withExecutor, withInterceptors, withMaxInboundMessageSize, withMaxOutboundMessageSize, withOnReadyThreshold, withOption, withWaitForReady
-
Method Details
-
build
- Specified by:
buildin classio.grpc.stub.AbstractStub<OctopusGrpc.OctopusStub>
-
query
public void query(QueryRequest request, io.grpc.stub.StreamObserver<QueryResponse> responseObserver) Retrieves existing entries from the database matching a key pattern. Can optionally include expired (include all revisions) objects and filter by creation time.
-
get
Retrieves only one existing entry from the database matching a key.
-
write
public void write(Object request, io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver) Stores an object on key.
-
call
-
listen
public io.grpc.stub.StreamObserver<ListenMessage> listen(io.grpc.stub.StreamObserver<EventCall> responseObserver) Bidirectional stream for real-time updates. Clients register for key-patterns (ListenMessage) and receive events (EventCall). Step 1: Registration The client must first send a `ListenMessage` message to specify which key-pattern to listen to. Step 2: Event Reception After registration, the server sends `EventCall` messages for objects matching the registered key-pattern. If you need other keys/more keys you can just send a new `ListenMessage`. This will reset all keys for the current subscription and the new keys will be used.
-