use of com.hazelcast.spi.impl.executionservice.ExecutionService in project hazelcast by hazelcast.
the class MetadataRaftGroupManager method scheduleGroupMembershipManagementTasks.
private void scheduleGroupMembershipManagementTasks() {
ExecutionService executionService = nodeEngine.getExecutionService();
executionService.scheduleWithRepetition(CP_SUBSYSTEM_MANAGEMENT_EXECUTOR, new BroadcastActiveCPMembersTask(), 0, BROADCAST_ACTIVE_CP_MEMBERS_TASK_PERIOD_SECONDS, SECONDS);
membershipManager.init();
}
use of com.hazelcast.spi.impl.executionservice.ExecutionService in project hazelcast by hazelcast.
the class RaftInvocationManager method triggerRaftNodeCreation.
void triggerRaftNodeCreation(CPGroupSummary group) {
for (CPMember groupMember : group.members()) {
if (groupMember.equals(raftService.getLocalCPMember())) {
ExecutionService executionService = nodeEngine.getExecutionService();
executionService.execute(CP_SUBSYSTEM_EXECUTOR, () -> raftService.createRaftNode(group.id(), group.initialMembers()));
} else {
Operation op = new CreateRaftNodeOp(group.id(), group.initialMembers());
OperationService operationService = nodeEngine.getOperationService();
operationService.send(op, groupMember.getAddress());
}
}
}
use of com.hazelcast.spi.impl.executionservice.ExecutionService in project hazelcast by hazelcast.
the class AbstractBlockingService method scheduleTimeout.
protected final void scheduleTimeout(CPGroupId groupId, String name, UUID invocationUid, long timeoutMs) {
if (timeoutMs > 0 && timeoutMs <= WAIT_TIMEOUT_TASK_UPPER_BOUND_MILLIS) {
ExecutionService executionService = nodeEngine.getExecutionService();
executionService.schedule(new ExpireWaitKeysTask(groupId, BiTuple.of(name, invocationUid)), timeoutMs, MILLISECONDS);
}
}
use of com.hazelcast.spi.impl.executionservice.ExecutionService in project hazelcast by hazelcast.
the class RaftSessionService method init.
@Override
public void init(NodeEngine nodeEngine, Properties properties) {
this.raftService = nodeEngine.getService(RaftService.SERVICE_NAME);
for (SessionAwareService service : nodeEngine.getServices(SessionAwareService.class)) {
service.setSessionAccessor(this);
}
ExecutionService executionService = nodeEngine.getExecutionService();
executionService.scheduleWithRepetition(new CheckSessionsToExpire(), CHECK_EXPIRED_SESSIONS_TASK_PERIOD_IN_MILLIS, CHECK_EXPIRED_SESSIONS_TASK_PERIOD_IN_MILLIS, MILLISECONDS);
executionService.scheduleWithRepetition(new CheckInactiveSessions(), CHECK_INACTIVE_SESSIONS_TASK_PERIOD_IN_MILLIS, CHECK_INACTIVE_SESSIONS_TASK_PERIOD_IN_MILLIS, MILLISECONDS);
this.nodeEngine.getMetricsRegistry().registerDynamicMetricsProvider(this);
}
use of com.hazelcast.spi.impl.executionservice.ExecutionService in project hazelcast by hazelcast.
the class ClusterHeartbeatManager method init.
/**
* Initializes the {@link ClusterHeartbeatManager}. It will schedule the
* heartbeat operation to the {@link #getHeartbeatInterval(HazelcastProperties)} interval.
*/
void init() {
ExecutionService executionService = nodeEngine.getExecutionService();
executionService.scheduleWithRepetition(CLUSTER_EXECUTOR_NAME, this::heartbeat, heartbeatIntervalMillis, heartbeatIntervalMillis, TimeUnit.MILLISECONDS);
if (icmpParallelMode) {
startPeriodicPinger();
}
}
Aggregations