use of com.hazelcast.scheduledexecutor.impl.operations.SyncStateOperation in project hazelcast by hazelcast.
the class ScheduledExecutorContainer method publishTaskState.
/**
* State is published after every run.
* When replicas get promoted, they start of, with the latest state see {@link TaskRunner#initOnce()}
*/
protected void publishTaskState(String taskName, Map stateSnapshot, ScheduledTaskStatisticsImpl statsSnapshot, ScheduledTaskResult result) {
if (logger.isFinestEnabled()) {
logger.finest("[Scheduler: " + name + "][Partition: " + partitionId + "][Task: " + taskName + "] " + "Publishing state, to replicas. State: " + stateSnapshot);
}
Operation op = new SyncStateOperation(getName(), taskName, stateSnapshot, statsSnapshot, result);
createInvocationBuilder(op).invoke().join();
}
Aggregations