Search in sources :

Example 1 with ScheduledExecutorContainerHolder

use of com.hazelcast.scheduledexecutor.impl.ScheduledExecutorContainerHolder in project hazelcast by hazelcast.

the class AbstractGetAllScheduledOperation method populateScheduledForHolder.

protected void populateScheduledForHolder(List<ScheduledTaskHandler> handlers, DistributedScheduledExecutorService service, int holderId) {
    ScheduledExecutorContainerHolder partition = service.getPartitionOrMemberBin(holderId);
    ScheduledExecutorContainer container = partition.getContainer(schedulerName);
    if (container == null || service.isShutdown(schedulerName)) {
        return;
    }
    Collection<ScheduledTaskDescriptor> tasks = container.getTasks();
    for (ScheduledTaskDescriptor task : tasks) {
        if (task.isTaskOwner()) {
            handlers.add(container.offprintHandler(task.getDefinition().getName()));
        }
    }
}
Also used : ScheduledExecutorContainerHolder(com.hazelcast.scheduledexecutor.impl.ScheduledExecutorContainerHolder) ScheduledTaskDescriptor(com.hazelcast.scheduledexecutor.impl.ScheduledTaskDescriptor) ScheduledExecutorContainer(com.hazelcast.scheduledexecutor.impl.ScheduledExecutorContainer)

Aggregations

ScheduledExecutorContainer (com.hazelcast.scheduledexecutor.impl.ScheduledExecutorContainer)1 ScheduledExecutorContainerHolder (com.hazelcast.scheduledexecutor.impl.ScheduledExecutorContainerHolder)1 ScheduledTaskDescriptor (com.hazelcast.scheduledexecutor.impl.ScheduledTaskDescriptor)1