Interface ProcedureMemberRpcs
- All Superinterfaces:
AutoCloseable,Closeable
- All Known Implementing Classes:
ZKProcedureMemberRpcs
This is the notification interface for Procedures that encapsulates message passing from members
to a coordinator. Each of these calls should send a message to the coordinator.
-
Method Summary
Modifier and TypeMethodDescriptionEach subprocedure is being executed on a member.voidsendMemberAborted(Subprocedure sub, ForeignException cause) Notify the coordinator that we aborted the specifiedSubprocedurevoidNotify the coordinator that the specifiedSubprocedurehas acquired the locally required barrier condition.voidsendMemberCompleted(Subprocedure sub, byte[] data) Notify the coordinator that the specifiedSubprocedurehas completed the work that needed to be done under the global barrier.voidstart(String memberName, ProcedureMember member) Initialize and start any threads or connections the member needs.
-
Method Details
-
start
Initialize and start any threads or connections the member needs. -
getMemberName
Each subprocedure is being executed on a member. This is the identifier for the member.- Returns:
- the member name
-
sendMemberAborted
Notify the coordinator that we aborted the specifiedSubprocedure- Parameters:
sub- theSubprocedurewe are abortingcause- the reason why the member's subprocedure aborted- Throws:
IOException- thrown when the rpcs can't reach the other members of the procedure (and thus can't recover).
-
sendMemberAcquired
Notify the coordinator that the specifiedSubprocedurehas acquired the locally required barrier condition.- Parameters:
sub- the specifiedSubprocedure- Throws:
IOException- if we can't reach the coordinator
-
sendMemberCompleted
Notify the coordinator that the specifiedSubprocedurehas completed the work that needed to be done under the global barrier.- Parameters:
sub- the specifiedSubproceduredata- the data the member returns to the coordinator along with the notification- Throws:
IOException- if we can't reach the coordinator
-