Search in sources :

Example 6 with LocalExecutorStats

use of com.hazelcast.monitor.LocalExecutorStats in project Activiti by Activiti.

the class HazelCastDistributedAsyncExecutor method shutdown.

@Override
public void shutdown() {
    super.shutdown();
    try {
        executorService.shutdown();
        executorService.awaitTermination(60, TimeUnit.SECONDS);
    } catch (InterruptedException e) {
        logger.warn("Exception while waiting for executor service shutdown", e);
    }
    LocalExecutorStats localExecutorStats = executorService.getLocalExecutorStats();
    logger.info("This async job executor has processed " + localExecutorStats.getCompletedTaskCount() + " jobs. Total execution time = " + localExecutorStats.getTotalExecutionLatency());
    hazelcastInstance.shutdown();
}
Also used : LocalExecutorStats(com.hazelcast.monitor.LocalExecutorStats)

Aggregations

LocalExecutorStats (com.hazelcast.monitor.LocalExecutorStats)6 ParallelTest (com.hazelcast.test.annotation.ParallelTest)5 QuickTest (com.hazelcast.test.annotation.QuickTest)5 Test (org.junit.Test)5 RejectedExecutionException (java.util.concurrent.RejectedExecutionException)3 Config (com.hazelcast.config.Config)2 ExecutorConfig (com.hazelcast.config.ExecutorConfig)2 HazelcastInstance (com.hazelcast.core.HazelcastInstance)2 IExecutorService (com.hazelcast.core.IExecutorService)2 CancellationException (java.util.concurrent.CancellationException)2 Future (java.util.concurrent.Future)2 TimeoutException (java.util.concurrent.TimeoutException)2 ICompletableFuture (com.hazelcast.core.ICompletableFuture)1 AssertTask (com.hazelcast.test.AssertTask)1 CountDownLatch (java.util.concurrent.CountDownLatch)1 ExecutionException (java.util.concurrent.ExecutionException)1