MasterInterceptor defines hook points for each guagua application. Four hooks are defined like hooks before
and after application and hooks after and before each iteration.
Almost all services in guagua like coordination, fail-over, profiler are implemented as interceptors. These are
system interceptors can be configured by using command line '-D' parameter.
After system interceptors, user defined interceptors are also supported for user to define his/her own interceptors.
Check SumOutput
in examples project to see how interceper is used to save global result at the end of
one guagua application.
For a list of interceptors, the order to call preXXX methods and postXXX methods is different. For example, a and b
two interceptors. The order is
a.preApplication->b.preApplication->a.preIteration->b.preIteration->computation->b.postIteration
->a.postIteration->b.postApplication->a.postApplication. This is like call stack to make sure each
interceptor to intercept the whole other interceptors and master computation.
BasicMasterInterceptor is a empty implementation for user to choose the hooks to override.