All procedures first attempt to reach a barrier point with the {@link #sendGlobalBarrierStart()}method. The procedure contacts all members and waits for all subprocedures to execute {@link Subprocedure#acquireBarrier} to acquire its local piece of the global barrier and thensend acquisition info back to the coordinator. If all acquisitions at subprocedures succeed, the coordinator then will call {@link #sendGlobalBarrierReached()}. This notifies members to execute the {@link Subprocedure#insideBarrier()} method. The procedure is blocked until all{@link Subprocedure#insideBarrier} executions complete at the members. When{@link Subprocedure#insideBarrier} completes at each member, the member sends notification tothe coordinator. Once all members complete, the coordinator calls {@link #sendGlobalBarrierComplete()}.
If errors are encountered remotely, they are forwarded to the coordinator, and {@link Subprocedure#cleanup(Exception)} is called.
Each Procedure and each Subprocedure enforces a time limit on the execution time. If the time limit expires before the procedure completes the {@link TimeoutExceptionInjector} will triggeran {@link ForeignException} to abort the procedure. This is particularly useful for situationswhen running a distributed {@link Subprocedure} so participants can avoid blocking for extremeamounts of time if one of the participants fails or takes a really long time (e.g. GC pause).
Users should generally not directly create or subclass instances of this. They are created for them implicitly via {@link ProcedureCoordinator#startProcedure(ForeignExceptionDispatcher,String,byte[],List)}}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|