Search in sources :

Example 1 with SyncStateOperation

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();
}
Also used : Operation(com.hazelcast.spi.Operation) ResultReadyNotifyOperation(com.hazelcast.scheduledexecutor.impl.operations.ResultReadyNotifyOperation) SyncStateOperation(com.hazelcast.scheduledexecutor.impl.operations.SyncStateOperation) SyncStateOperation(com.hazelcast.scheduledexecutor.impl.operations.SyncStateOperation)

Aggregations

ResultReadyNotifyOperation (com.hazelcast.scheduledexecutor.impl.operations.ResultReadyNotifyOperation)1 SyncStateOperation (com.hazelcast.scheduledexecutor.impl.operations.SyncStateOperation)1 Operation (com.hazelcast.spi.Operation)1