Class OctopusGrpc.OctopusBlockingV2Stub

java.lang.Object
io.grpc.stub.AbstractStub<OctopusGrpc.OctopusBlockingV2Stub>
io.grpc.stub.AbstractBlockingStub<OctopusGrpc.OctopusBlockingV2Stub>
studio.o7.octopus.sdk.v1.OctopusGrpc.OctopusBlockingV2Stub
Enclosing class:
OctopusGrpc

public static final class OctopusGrpc.OctopusBlockingV2Stub extends io.grpc.stub.AbstractBlockingStub<OctopusGrpc.OctopusBlockingV2Stub>
A stub to allow clients to do synchronous 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)
     
    call(Object request)
    Stores an object on key in the database and returns the stored version, including the revision and ID.
    get(GetRequest request)
    Retrieves only one existing entry from the database matching a key.
    io.grpc.stub.BlockingClientCall<ListenMessage, EventCall>
    Bidirectional stream for real-time updates.
    Retrieves existing entries from the database matching a key pattern.
    com.google.protobuf.Empty
    write(Object request)
    Stores an object on key.

    Methods inherited from class io.grpc.stub.AbstractBlockingStub

    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.OctopusBlockingV2Stub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions)
      Specified by:
      build in class io.grpc.stub.AbstractStub<OctopusGrpc.OctopusBlockingV2Stub>
    • query

      public QueryResponse query(QueryRequest request) throws io.grpc.StatusException
      
      Retrieves existing entries from the database matching a
      key pattern. Can optionally include expired (include all
      revisions) objects and filter by creation time.
      
      Throws:
      io.grpc.StatusException
    • get

      public GetResponse get(GetRequest request) throws io.grpc.StatusException
      
      Retrieves only one existing entry from the database matching a key.
      
      Throws:
      io.grpc.StatusException
    • write

      public com.google.protobuf.Empty write(Object request) throws io.grpc.StatusException
      
      Stores an object on key.
      
      Throws:
      io.grpc.StatusException
    • call

      public Entry call(Object request) throws io.grpc.StatusException
      
      Stores an object on key in the database and returns the
      stored version, including the revision and ID.
      
      Throws:
      io.grpc.StatusException
    • listen

      @ExperimentalApi("https://github.com/grpc/grpc-java/issues/10918") public io.grpc.stub.BlockingClientCall<ListenMessage, EventCall> listen()
      
      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.