本文整理了Java中org.jboss.netty.util.Timer.stop()
方法的一些代码示例,展示了Timer.stop()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Timer.stop()
方法的具体详情如下:
包路径:org.jboss.netty.util.Timer
类名称:Timer
方法名:stop
[英]Releases all resources acquired by this Timer and cancels all tasks which were scheduled but not executed yet.
[中]释放此计时器获取的所有资源,并取消所有已计划但尚未执行的任务。
代码示例来源:origin: io.netty/netty
/**
* Stops the {@link Timer} which was specified in the constructor of this
* handler. You should not call this method if the {@link Timer} is in use
* by other objects.
*/
public void releaseExternalResources() {
timer.stop();
}
代码示例来源:origin: io.netty/netty
/**
* Stops the {@link Timer} which was specified in the constructor of this
* handler. You should not call this method if the {@link Timer} is in use
* by other objects.
*/
public void releaseExternalResources() {
timer.stop();
}
代码示例来源:origin: io.netty/netty
/**
* Stops the {@link Timer} which was specified in the constructor of this
* handler. You should not call this method if the {@link Timer} is in use
* by other objects.
*/
public void releaseExternalResources() {
timer.stop();
}
代码示例来源:origin: io.netty/netty
@Override
public void shutdown() {
super.shutdown();
if (stopTimer) {
timer.stop();
}
}
代码示例来源:origin: io.netty/netty
@Override
public void releaseExternalResources() {
super.releaseExternalResources();
timer.stop();
}
}
代码示例来源:origin: apache/hive
protected void stop() throws Exception {
accepted.close().awaitUninterruptibly(10, TimeUnit.SECONDS);
if (selector != null) {
ServerBootstrap bootstrap = new ServerBootstrap(selector);
bootstrap.releaseExternalResources();
}
if (pipelineFact != null) {
pipelineFact.destroy();
}
if (timer != null) {
// Release this shared timer resource
timer.stop();
}
if (dirWatcher != null) {
dirWatcher.stop();
}
}
代码示例来源:origin: com.ning/async-http-client
public void close() {
if (closed.compareAndSet(false, true)) {
try {
channelManager.close();
// FIXME shouldn't close if not allowed
config.executorService().shutdown();
if (allowStopNettyTimer)
nettyTimer.stop();
} catch (Throwable t) {
LOGGER.warn("Unexpected error on close", t);
}
}
}
代码示例来源:origin: org.onosproject/onos-pcep-controller-impl
@Override
public void releaseExternalResources() {
TIMER.stop();
}
}
代码示例来源:origin: org.onosproject/onos-of-ctl
@Override
public void releaseExternalResources() {
timer.stop();
}
}
代码示例来源:origin: org.onosproject/onos-app-routing
/**
* Closes the session.
*
* @param ctx the Channel Handler Context
*/
void closeSession(ChannelHandlerContext ctx) {
timer.stop();
closeChannel(ctx);
}
代码示例来源:origin: nyankosama/simple-netty-source
@Override
public void releaseExternalResources() {
super.releaseExternalResources();
timer.stop();
}
}
代码示例来源:origin: com.facebook.nifty/nifty-client
@Override
public void close()
{
// Stop the timer thread first, so no timeouts can fire during the rest of the
// shutdown process
timer.stop();
ShutdownUtil.shutdownChannelFactory(channelFactory,
bossExecutor,
workerExecutor,
allChannels);
}
代码示例来源:origin: net.sourceforge.openutils/flazr
public void close() {
if(!usingSharedTimer) {
timer.stop();
}
reader.close();
}
代码示例来源:origin: org.asynchttpclient/async-http-client-netty3-provider
public void close() {
if (closed.compareAndSet(false, true)) {
try {
channelManager.close();
// FIXME shouldn't close if not allowed
config.executorService().shutdown();
if (allowStopNettyTimer)
nettyTimer.stop();
} catch (Throwable t) {
LOGGER.warn("Unexpected error on close", t);
}
}
}
代码示例来源:origin: com.fizzed/ch-smpp
@Override
public void destroy() {
this.bindTimer.cancel();
stop();
this.serverBootstrap.releaseExternalResources();
this.serverBootstrap = null;
this.writeTimeoutTimer.stop();
unregisterMBean();
logger.info("{} destroyed on SMPP port [{}]", configuration.getName(), configuration.getPort());
}
代码示例来源:origin: com.cloudhopper/ch-smpp
@Override
public void destroy() {
// close all channels still open within this session "bootstrap"
this.channels.close().awaitUninterruptibly();
// clean up all external resources
this.clientBootstrap.releaseExternalResources();
// stop the writeTimeout timer
this.writeTimeoutTimer.stop();
}
代码示例来源:origin: twitter-archive/cloudhopper-smpp
@Override
public void destroy() {
this.bindTimer.cancel();
stop();
this.serverBootstrap.releaseExternalResources();
this.serverBootstrap = null;
this.writeTimeoutTimer.stop();
unregisterMBean();
logger.info("{} destroyed on SMPP port [{}]", configuration.getName(), configuration.getPort());
}
代码示例来源:origin: twitter-archive/cloudhopper-smpp
@Override
public void destroy() {
// close all channels still open within this session "bootstrap"
this.channels.close().awaitUninterruptibly();
// clean up all external resources
this.clientBootstrap.releaseExternalResources();
// stop the writeTimeout timer
this.writeTimeoutTimer.stop();
}
代码示例来源:origin: org.restcomm.smpp/ch-smpp
@Override
public void destroy() {
// close all channels still open within this session "bootstrap"
this.channels.close().awaitUninterruptibly();
// clean up all external resources
this.clientBootstrap.releaseExternalResources();
// stop the writeTimeout timer
this.writeTimeoutTimer.stop();
}
代码示例来源:origin: org.apache.camel/camel-netty
@Override
protected void doStop() throws Exception {
if (timer != null) {
timer.stop();
timer = null;
}
if (executorService != null) {
getCamelContext().getExecutorServiceManager().shutdownNow(executorService);
executorService = null;
}
super.doStop();
}
内容来源于网络,如有侵权,请联系作者删除!