org.apache.hadoop.hbase.procedure
Interface ProcedureMemberRpcs

All Superinterfaces:
Closeable
All Known Implementing Classes:
ZKProcedureMemberRpcs

@InterfaceAudience.Public
@InterfaceStability.Evolving
public interface ProcedureMemberRpcs
extends Closeable

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
 String getMemberName()
          Each subprocedure is being executed on a member.
 void sendMemberAborted(Subprocedure sub, ForeignException cause)
          Notify the coordinator that we aborted the specified Subprocedure
 void sendMemberAcquired(Subprocedure sub)
          Notify the coordinator that the specified Subprocedure has acquired the locally required barrier condition.
 void sendMemberCompleted(Subprocedure sub)
          Notify the coordinator that the specified Subprocedure 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.
 
Methods inherited from interface java.io.Closeable
close
 

Method Detail

start

void start(String memberName,
           ProcedureMember member)
Initialize and start any threads or connections the member needs.


getMemberName

String getMemberName()
Each subprocedure is being executed on a member. This is the identifier for the member.

Returns:
the member name

sendMemberAborted

void sendMemberAborted(Subprocedure sub,
                       ForeignException cause)
                       throws IOException
Notify the coordinator that we aborted the specified Subprocedure

Parameters:
sub - the Subprocedure we are aborting
cause - 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

void sendMemberAcquired(Subprocedure sub)
                        throws IOException
Notify the coordinator that the specified Subprocedure has acquired the locally required barrier condition.

Parameters:
sub - the specified Subprocedure
Throws:
IOException - if we can't reach the coordinator

sendMemberCompleted

void sendMemberCompleted(Subprocedure sub)
                         throws IOException
Notify the coordinator that the specified Subprocedure has completed the work that needed to be done under the global barrier.

Parameters:
sub - the specified Subprocedure
Throws:
IOException - if we can't reach the coordinator


Copyright © 2013 The Apache Software Foundation. All Rights Reserved.