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.void
sendMemberAborted
(Subprocedure sub, ForeignException cause) Notify the coordinator that we aborted the specifiedSubprocedure
void
Notify the coordinator that the specifiedSubprocedure
has acquired the locally required barrier condition.void
sendMemberCompleted
(Subprocedure sub, byte[] data) Notify the coordinator that the specifiedSubprocedure
has completed the work that needed to be done under the global barrier.void
start
(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
- theSubprocedure
we 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 specifiedSubprocedure
has 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 specifiedSubprocedure
has completed the work that needed to be done under the global barrier.- Parameters:
sub
- the specifiedSubprocedure
data
- the data the member returns to the coordinator along with the notification- Throws:
IOException
- if we can't reach the coordinator
-