Class WatchPermissionsServiceGrpc.WatchPermissionsServiceBlockingStub

java.lang.Object
io.grpc.stub.AbstractStub<S>
io.grpc.stub.AbstractBlockingStub<WatchPermissionsServiceGrpc.WatchPermissionsServiceBlockingStub>
com.authzed.api.materialize.v0.WatchPermissionsServiceGrpc.WatchPermissionsServiceBlockingStub
Enclosing class:
WatchPermissionsServiceGrpc

public static final class WatchPermissionsServiceGrpc.WatchPermissionsServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub<WatchPermissionsServiceGrpc.WatchPermissionsServiceBlockingStub>
A stub to allow clients to do synchronous rpc calls to service WatchPermissionsService.
  • Nested Class Summary

    Nested classes/interfaces inherited from class io.grpc.stub.AbstractStub

    io.grpc.stub.AbstractStub.StubFactory<T extends io.grpc.stub.AbstractStub<T>>
  • Method Summary

    Modifier and Type
    Method
    Description
    build(io.grpc.Channel channel, io.grpc.CallOptions callOptions)
     
    WatchPermissions returns a stream of PermissionChange events for the given permissions.

    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, withExecutor, withInterceptors, withMaxInboundMessageSize, withMaxOutboundMessageSize, withOnReadyThreshold, withOption, withWaitForReady

    Methods inherited from class java.lang.Object

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

    • build

      protected WatchPermissionsServiceGrpc.WatchPermissionsServiceBlockingStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions)
      Specified by:
      build in class io.grpc.stub.AbstractStub<WatchPermissionsServiceGrpc.WatchPermissionsServiceBlockingStub>
    • watchPermissions

      public Iterator<WatchPermissionsResponse> watchPermissions(WatchPermissionsRequest request)
       WatchPermissions returns a stream of PermissionChange events for the given permissions.
       WatchPermissions is a long-running RPC, and will stream events until the client
       closes the connection or the server terminates the stream. The consumer is responsible of
       keeping track of the last seen revision and resuming the stream from that point in the event
       of disconnection or client-side restarts.
       The API does not offer a sharding mechanism and thus there should only be one consumer per target system.
       Implementing an active-active HA consumer setup over the same target system will require coordinating which
       revisions have been consumed in order to prevent transitioning to an inconsistent state.
       Usage of WatchPermissions requires to be explicitly enabled on the service, including the permissions to be
       watched. It requires more resources and is less performant than WatchPermissionsSets. It's usage
       is only recommended when performing the set intersections of WatchPermissionSets in the client side is not viable
       or there is a strict application requirement to use consume the computed permissions.