Interface ClusterFollower.Handler

Enclosing class:
ClusterFollower
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface ClusterFollower.Handler
Executes one message; the follower acknowledges it afterwards.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    handle(int op, DataInputStream in)
    Executes a message.
  • Method Details

    • handle

      int handle(int op, DataInputStream in) throws Exception
      Executes a message.
      Parameters:
      op - the op code (never the shutdown code).
      in - the payload.
      Returns:
      a value to return with the acknowledgement, or -1 for none.
      Throws:
      Exception - any failure; it is reported to the leader and ends the process.