Java Code Examples for org.apache.rocketmq.common.utils.ThreadUtils#shutdownGracefully()

The following examples show how to use org.apache.rocketmq.common.utils.ThreadUtils#shutdownGracefully() . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
public void shutdown(long awaitTerminateMillis) {
    this.stopped = true;
    this.scheduledExecutorService.shutdown();
    ThreadUtils.shutdownGracefully(this.consumeExecutor, awaitTerminateMillis, TimeUnit.MILLISECONDS);
    if (MessageModel.CLUSTERING.equals(this.defaultMQPushConsumerImpl.messageModel())) {
        this.unlockAllMQ();
    }
}
 
Example 2
Source Project: DDMQ   File: LocalMessageCache.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public void shutdown() {
    ThreadUtils.shutdownGracefully(cleanExpireMsgExecutors, 5000, TimeUnit.MILLISECONDS);
}
 
Example 3
Source Project: DDMQ   File: PullMessageService.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public void shutdown(boolean interrupt) {
    super.shutdown(interrupt);
    ThreadUtils.shutdownGracefully(this.scheduledExecutorService, 1000, TimeUnit.MILLISECONDS);
}
 
Example 4
@Override
public void shutdown() {
    ThreadUtils.shutdownGracefully(cleanExpireMsgExecutors, 5000, TimeUnit.MILLISECONDS);
}
 
Example 5
@Override
public void shutdown(boolean interrupt) {
    super.shutdown(interrupt);
    ThreadUtils.shutdownGracefully(this.scheduledExecutorService, 1000, TimeUnit.MILLISECONDS);
}
 
Example 6
@Override
public void shutdown(boolean interrupt) {
    super.shutdown(interrupt);
    ThreadUtils.shutdownGracefully(this.executorService, 1000, TimeUnit.MILLISECONDS);
}
 
Example 7
Source Project: rocketmq-read   File: LocalMessageCache.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public void shutdown() {
    ThreadUtils.shutdownGracefully(cleanExpireMsgExecutors, 5000, TimeUnit.MILLISECONDS);
}
 
Example 8
@Override
public void shutdown(boolean interrupt) {
    super.shutdown(interrupt);
    ThreadUtils.shutdownGracefully(this.scheduledExecutorService, 1000, TimeUnit.MILLISECONDS);
}
 
Example 9
Source Project: DDMQ   File: LocalMessageCache.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public void shutdown() {
    ThreadUtils.shutdownGracefully(cleanExpireMsgExecutors, 5000, TimeUnit.MILLISECONDS);
}
 
Example 10
Source Project: DDMQ   File: PullMessageService.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public void shutdown(boolean interrupt) {
    super.shutdown(interrupt);
    ThreadUtils.shutdownGracefully(this.scheduledExecutorService, 1000, TimeUnit.MILLISECONDS);
}
 
Example 11
@Override
public void shutdown() {
    ThreadUtils.shutdownGracefully(cleanExpireMsgExecutors, 5000, TimeUnit.MILLISECONDS);
}
 
Example 12
@Override
public void shutdown(boolean interrupt) {
    super.shutdown(interrupt);
    ThreadUtils.shutdownGracefully(this.scheduledExecutorService, 1000, TimeUnit.MILLISECONDS);
}
 
Example 13
Source Project: rocketmq   File: LocalMessageCache.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public void shutdown() {
    ThreadUtils.shutdownGracefully(cleanExpireMsgExecutors, 5000, TimeUnit.MILLISECONDS);
}
 
Example 14
Source Project: rocketmq   File: PullMessageService.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public void shutdown(boolean interrupt) {
    super.shutdown(interrupt);
    ThreadUtils.shutdownGracefully(this.scheduledExecutorService, 1000, TimeUnit.MILLISECONDS);
}
 
Example 15
public void shutdown(long awaitTerminateMillis) {
    this.scheduledExecutorService.shutdown();
    ThreadUtils.shutdownGracefully(this.consumeExecutor, awaitTerminateMillis, TimeUnit.MILLISECONDS);
    this.cleanExpireMsgExecutors.shutdown();
}