void publishTaskState ( String taskName , Map stateSnapshot , ScheduledTaskStatisticsImpl statsSnapshot , ScheduledTaskResult result ) { if ( logger . isFinestEnabled ( ) ) { log ( FINEST , "Publishing state, to replicas. State: " + stateSnapshot ) ; } Operation op = new SyncStateOperation ( getName ( ) , taskName , stateSnapshot , statsSnapshot , result ) ; createInvocationBuilder ( op ) . invoke ( ) . join ( ) ; }
State is published after every run . When replicas get promoted they start with the latest state .