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 Type
    Method
    Description
    build(io.grpc.Channel channel, io.grpc.CallOptions callOptions)
     
    void
    call(Object request, io.grpc.stub.StreamObserver<Entry> responseObserver)
    Stores an object on key in the database and returns the stored version, including the revision and ID.
    void
    get(GetRequest request, io.grpc.stub.StreamObserver<GetResponse> responseObserver)
    Retrieves only one existing entry from the database matching a key.
    io.grpc.stub.StreamObserver<ListenMessage>
    listen(io.grpc.stub.StreamObserver<EventCall> responseObserver)
    Bidirectional stream for real-time updates.
    void
    query(QueryRequest request, io.grpc.stub.StreamObserver<QueryResponse> responseObserver)
    Retrieves existing entries from the database matching a key pattern.
    void
    write(Object request, io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver)
    Stores an object on key.

    Methods inherited from class io.grpc.stub.AbstractAsyncStub

    newStub, newStub

    Methods inherited from class io.grpc.stub.AbstractStub

    getCallOptions, getChannel, withCallCredentials, withChannel, withCompression, withDeadline, withDeadlineAfter, withDeadlineAfter, withExecutor, withInterceptors, withMaxInboundMessageSize, withMaxOutboundMessageSize, withOnReadyThreshold, withOption, withWaitForReady

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • build

      protected OctopusGrpc.OctopusStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions)
      Specified by:
      build in class io.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

      public void get(GetRequest request, io.grpc.stub.StreamObserver<GetResponse> responseObserver)
      
      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

      public void call(Object request, io.grpc.stub.StreamObserver<Entry> responseObserver)
      
      Stores an object on key in the database and returns the
      stored version, including the revision and ID.
      
    • 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.