Search in sources :

Example 1 with TaskScheduler

use of com.hazelcast.spi.impl.executionservice.TaskScheduler in project hazelcast by hazelcast.

the class LockStoreContainer method createScheduler.

private EntryTaskScheduler<Data, Integer> createScheduler(ObjectNamespace namespace) {
    NodeEngine nodeEngine = lockService.getNodeEngine();
    LockEvictionProcessor entryProcessor = new LockEvictionProcessor(nodeEngine, namespace);
    TaskScheduler globalScheduler = nodeEngine.getExecutionService().getGlobalTaskScheduler();
    return EntryTaskSchedulerFactory.newScheduler(globalScheduler, entryProcessor, ScheduleType.FOR_EACH);
}
Also used : NodeEngine(com.hazelcast.spi.impl.NodeEngine) TaskScheduler(com.hazelcast.spi.impl.executionservice.TaskScheduler) EntryTaskScheduler(com.hazelcast.internal.util.scheduler.EntryTaskScheduler)

Example 2 with TaskScheduler

use of com.hazelcast.spi.impl.executionservice.TaskScheduler in project hazelcast by hazelcast.

the class DefaultClientExtension method createNearCacheManager.

@Override
public NearCacheManager createNearCacheManager() {
    SerializationService ss = client.getSerializationService();
    TaskScheduler taskScheduler = client.getTaskScheduler();
    ClassLoader classLoader = client.getClientConfig().getClassLoader();
    HazelcastProperties properties = client.getProperties();
    return new DefaultNearCacheManager(ss, taskScheduler, classLoader, properties);
}
Also used : HazelcastProperties(com.hazelcast.spi.properties.HazelcastProperties) SerializationService(com.hazelcast.internal.serialization.SerializationService) InternalSerializationService(com.hazelcast.internal.serialization.InternalSerializationService) DefaultNearCacheManager(com.hazelcast.internal.nearcache.impl.DefaultNearCacheManager) TaskScheduler(com.hazelcast.spi.impl.executionservice.TaskScheduler)

Example 3 with TaskScheduler

use of com.hazelcast.spi.impl.executionservice.TaskScheduler in project hazelcast by hazelcast.

the class ClientInvocationServiceImpl method start.

public void start() {
    responseHandlerSupplier.start();
    if (isBackupAckToClientEnabled) {
        TaskScheduler executionService = client.getTaskScheduler();
        long cleanResourcesMillis = client.getProperties().getPositiveMillisOrDefault(CLEAN_RESOURCES_MILLIS);
        executionService.scheduleWithRepetition(new BackupTimeoutTask(), cleanResourcesMillis, cleanResourcesMillis, MILLISECONDS);
    }
}
Also used : TaskScheduler(com.hazelcast.spi.impl.executionservice.TaskScheduler)

Aggregations

TaskScheduler (com.hazelcast.spi.impl.executionservice.TaskScheduler)3 DefaultNearCacheManager (com.hazelcast.internal.nearcache.impl.DefaultNearCacheManager)1 InternalSerializationService (com.hazelcast.internal.serialization.InternalSerializationService)1 SerializationService (com.hazelcast.internal.serialization.SerializationService)1 EntryTaskScheduler (com.hazelcast.internal.util.scheduler.EntryTaskScheduler)1 NodeEngine (com.hazelcast.spi.impl.NodeEngine)1 HazelcastProperties (com.hazelcast.spi.properties.HazelcastProperties)1