Java Code Examples for com.alibaba.dubbo.common.utils.ExecutorUtil#gracefulShutdown()

The following examples show how to use com.alibaba.dubbo.common.utils.ExecutorUtil#gracefulShutdown() . 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
Source Project: dubbo-2.6.5   File: DubboRegistry.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public void destroy() {
    super.destroy();
    try {
        // Cancel the reconnection timer
        if (!reconnectFuture.isCancelled()) {
            reconnectFuture.cancel(true);
        }
    } catch (Throwable t) {
        logger.warn("Failed to cancel reconnect timer", t);
    }
    registryInvoker.destroy();
    ExecutorUtil.gracefulShutdown(reconnectTimer, reconnectPeriod);
}
 
Example 2
Source Project: dubbo-2.6.5   File: FailbackRegistry.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public void destroy() {
    super.destroy();
    try {
        retryFuture.cancel(true);
    } catch (Throwable t) {
        logger.warn(t.getMessage(), t);
    }
    ExecutorUtil.gracefulShutdown(retryExecutor, retryPeriod);
}
 
Example 3
Source Project: dubbo-2.6.5   File: AbstractClient.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public void close(int timeout) {
    ExecutorUtil.gracefulShutdown(executor, timeout);
    close();
}
 
Example 4
Source Project: dubbo-2.6.5   File: AbstractServer.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public void close(int timeout) {
    ExecutorUtil.gracefulShutdown(executor, timeout);
    close();
}
 
Example 5
Source Project: dubbox   File: AbstractClient.java    License: Apache License 2.0 4 votes vote down vote up
public void close(int timeout) {
    ExecutorUtil.gracefulShutdown(executor ,timeout);
    close();
}
 
Example 6
Source Project: dubbox   File: AbstractServer.java    License: Apache License 2.0 4 votes vote down vote up
public void close(int timeout) {
    ExecutorUtil.gracefulShutdown(executor ,timeout);
    close();
}
 
Example 7
Source Project: dubbox-hystrix   File: AbstractClient.java    License: Apache License 2.0 4 votes vote down vote up
public void close(int timeout) {
    ExecutorUtil.gracefulShutdown(executor ,timeout);
    close();
}
 
Example 8
Source Project: dubbox-hystrix   File: AbstractServer.java    License: Apache License 2.0 4 votes vote down vote up
public void close(int timeout) {
    ExecutorUtil.gracefulShutdown(executor ,timeout);
    close();
}
 
Example 9
Source Project: dubbo3   File: AbstractClient.java    License: Apache License 2.0 4 votes vote down vote up
public void close(int timeout) {
    ExecutorUtil.gracefulShutdown(executor, timeout);
    close();
}
 
Example 10
Source Project: dubbo3   File: AbstractServer.java    License: Apache License 2.0 4 votes vote down vote up
public void close(int timeout) {
    ExecutorUtil.gracefulShutdown(executor ,timeout);
    close();
}
 
Example 11
Source Project: dubbox   File: AbstractClient.java    License: Apache License 2.0 4 votes vote down vote up
public void close(int timeout) {
    ExecutorUtil.gracefulShutdown(executor ,timeout);
    close();
}
 
Example 12
Source Project: dubbox   File: AbstractServer.java    License: Apache License 2.0 4 votes vote down vote up
public void close(int timeout) {
    ExecutorUtil.gracefulShutdown(executor ,timeout);
    close();
}
 
Example 13
Source Project: dubbox   File: AbstractClient.java    License: Apache License 2.0 4 votes vote down vote up
public void close(int timeout) {
    ExecutorUtil.gracefulShutdown(executor ,timeout);
    close();
}
 
Example 14
Source Project: dubbox   File: AbstractServer.java    License: Apache License 2.0 4 votes vote down vote up
public void close(int timeout) {
    ExecutorUtil.gracefulShutdown(executor ,timeout);
    close();
}