Class AtomixServerTransport

    • Constructor Detail

      • AtomixServerTransport

        public AtomixServerTransport​(int nodeId,
                                     MessagingService messagingService)
    • Method Detail

      • subscribe

        public ActorFuture<Void> subscribe​(int partitionId,
                                           RequestHandler requestHandler)
        Description copied from interface: ServerTransport
        Subscribes to the given partition and call's the given handler on each new request.
        Specified by:
        subscribe in interface ServerTransport
        Parameters:
        partitionId - the partition, for which should be subscribed
        requestHandler - the handler which should be called.
      • unsubscribe

        public ActorFuture<Void> unsubscribe​(int partitionId)
        Description copied from interface: ServerTransport
        Unsubscribe from the given partition, the registered handler will no longer be called on new requests.
        Specified by:
        unsubscribe in interface ServerTransport
        Parameters:
        partitionId - the partition, from which we should unsubscribe
      • sendResponse

        public void sendResponse​(ServerResponse response)
        Description copied from interface: ServerOutput
        Sends the given response. The corresponding partition and request id is extracted from the response object.

        This method should decouple the the request handling, such that response sending can be done later asynchronously.

        Specified by:
        sendResponse in interface ServerOutput
        Parameters:
        response - the response which should be send