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() . 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
Source File: ConsumeMessageOrderlyService.java    From rocketmq with Apache License 2.0 5 votes vote down vote up
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 File: LocalMessageCache.java    From DDMQ with Apache License 2.0 4 votes vote down vote up
@Override
public void shutdown() {
    ThreadUtils.shutdownGracefully(cleanExpireMsgExecutors, 5000, TimeUnit.MILLISECONDS);
}
 
Example 3
Source File: PullMessageService.java    From DDMQ with 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
Source File: LocalMessageCache.java    From rocketmq-4.3.0 with Apache License 2.0 4 votes vote down vote up
@Override
public void shutdown() {
    ThreadUtils.shutdownGracefully(cleanExpireMsgExecutors, 5000, TimeUnit.MILLISECONDS);
}
 
Example 5
Source File: PullMessageService.java    From rocketmq-4.3.0 with 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 6
Source File: DeFiBusPullMessageService.java    From DeFiBus with Apache License 2.0 4 votes vote down vote up
@Override
public void shutdown(boolean interrupt) {
    super.shutdown(interrupt);
    ThreadUtils.shutdownGracefully(this.executorService, 1000, TimeUnit.MILLISECONDS);
}
 
Example 7
Source File: LocalMessageCache.java    From rocketmq-read with Apache License 2.0 4 votes vote down vote up
@Override
public void shutdown() {
    ThreadUtils.shutdownGracefully(cleanExpireMsgExecutors, 5000, TimeUnit.MILLISECONDS);
}
 
Example 8
Source File: PullMessageService.java    From rocketmq-read with 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 9
Source File: LocalMessageCache.java    From DDMQ with Apache License 2.0 4 votes vote down vote up
@Override
public void shutdown() {
    ThreadUtils.shutdownGracefully(cleanExpireMsgExecutors, 5000, TimeUnit.MILLISECONDS);
}
 
Example 10
Source File: PullMessageService.java    From DDMQ with 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
Source File: LocalMessageCache.java    From rocketmq-all-4.1.0-incubating with Apache License 2.0 4 votes vote down vote up
@Override
public void shutdown() {
    ThreadUtils.shutdownGracefully(cleanExpireMsgExecutors, 5000, TimeUnit.MILLISECONDS);
}
 
Example 12
Source File: PullMessageService.java    From rocketmq-all-4.1.0-incubating with 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 13
Source File: LocalMessageCache.java    From rocketmq with Apache License 2.0 4 votes vote down vote up
@Override
public void shutdown() {
    ThreadUtils.shutdownGracefully(cleanExpireMsgExecutors, 5000, TimeUnit.MILLISECONDS);
}
 
Example 14
Source File: PullMessageService.java    From rocketmq with 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
Source File: ConsumeMessageConcurrentlyService.java    From rocketmq with Apache License 2.0 4 votes vote down vote up
public void shutdown(long awaitTerminateMillis) {
    this.scheduledExecutorService.shutdown();
    ThreadUtils.shutdownGracefully(this.consumeExecutor, awaitTerminateMillis, TimeUnit.MILLISECONDS);
    this.cleanExpireMsgExecutors.shutdown();
}