Interface ProcedureCoordinatorRpcs

All Superinterfaces:
AutoCloseable, Closeable
All Known Implementing Classes:
ZKProcedureCoordinator

@Private public interface ProcedureCoordinatorRpcs extends Closeable
RPCs for the coordinator to run a barriered procedure with subprocedures executed at distributed members.
See Also:
  • Method Details

    • start

      boolean start(ProcedureCoordinator listener)
      Initialize and start threads necessary to connect an implementation's rpc mechanisms.
      Returns:
      true if succeed, false if encountered initialization errors.
    • sendAbortToMembers

      Notify the members that the coordinator has aborted the procedure and that it should release barrier resources.
      Parameters:
      procName - name of the procedure that was aborted
      cause - the reason why the procedure needs to be aborted
      Throws:
      IOException - if the rpcs can't reach the other members of the procedure (and can't recover).
    • sendGlobalBarrierAcquire

      void sendGlobalBarrierAcquire(Procedure procName, byte[] info, List<String> members) throws IOException, IllegalArgumentException
      Notify the members to acquire barrier for the procedure
      Parameters:
      procName - name of the procedure to start
      info - information that should be passed to all members
      members - names of the members requested to reach the acquired phase
      Throws:
      IllegalArgumentException - if the procedure was already marked as failed
      IOException - if we can't reach the remote notification mechanism
    • sendGlobalBarrierReached

      void sendGlobalBarrierReached(Procedure procName, List<String> members) throws IOException
      Notify members that all members have acquired their parts of the barrier and that they can now execute under the global barrier. Must come after calling sendGlobalBarrierAcquire(Procedure, byte[], List)
      Parameters:
      procName - name of the procedure to start
      members - members to tell we have reached in-barrier phase
      Throws:
      IOException - if we can't reach the remote notification mechanism
    • resetMembers

      void resetMembers(Procedure procName) throws IOException
      Notify Members to reset the distributed state for procedure
      Parameters:
      procName - name of the procedure to reset
      Throws:
      IOException - if the remote notification mechanism cannot be reached