public void destroy() { super.destroy(); if(logical_addr_cache_reaper != null) { logical_addr_cache_reaper.cancel(false); logical_addr_cache_reaper=null; } if(time_service != null) time_service.stop(); // Stop the thread pool if(thread_pool instanceof ExecutorService) shutdownThreadPool(thread_pool); if(internal_pool instanceof ExecutorService) shutdownThreadPool(internal_pool); if(timer != null) timer.stop(); }
@Override public void stop() { if (!getTimer().isShutdown()) { getTimer().stop(); } super.stop(); }
public void destroy() { if(top_prot != null) { Configurator.destroyProtocolStack(top_prot); // destroys msg queues and threads top_prot=null; } try { timer.stop(); } catch(Exception ex) { } }
/** * Stop the rentransmition and clear all pending msgs. * <p> * If this retransmitter has been provided an externally managed * scheduler, then just clear all msgs and the associated tasks, else * stop the scheduler. In this case the method blocks until the * scheduler's thread is dead. Only the owner of the scheduler should * stop it. */ public void stop() { // i. If retransmitter is owned, stop it else cancel all tasks // ii. Clear all pending msgs synchronized(msgs) { if(retransmitter_owned) { try { timer.stop(); } catch(InterruptedException ex) { if(log.isErrorEnabled()) log.error("failed stopping retransmitter", ex); Thread.currentThread().interrupt(); // set interrupt flag again } } else { for(Entry entry: msgs) { entry.cancel(); } } msgs.clear(); } }
/** * Stop the rentransmition and clear all pending msgs. * <p/> * If this retransmitter has been provided an externally managed * scheduler, then just clear all msgs and the associated tasks, else * stop the scheduler. In this case the method blocks until the * scheduler's thread is dead. Only the owner of the scheduler should * stop it. */ public void stop() { // i. If retransmitter is owned, stop it else cancel all tasks // ii. Clear all pending msgs and notify anyone waiting synchronized(msgs) { if(retransmitter_owned) { try { timer.stop(); } catch(InterruptedException ex) { if(log.isErrorEnabled()) log.error(_toString(ex)); } } else { for(Entry entry: msgs.values()) { entry.cancel(); } } msgs.clear(); msgs.notifyAll(); // wake up waitUntilAllAcksReceived() method } }
public void destroy() { super.destroy(); if(logical_addr_cache_reaper != null) { logical_addr_cache_reaper.cancel(false); logical_addr_cache_reaper=null; } if(time_service != null) time_service.stop(); // Stop the thread pool if(thread_pool instanceof ExecutorService) shutdownThreadPool(thread_pool); if(internal_pool instanceof ExecutorService) shutdownThreadPool(internal_pool); if(timer != null) timer.stop(); }
@Override public void stop() { super.stop(); if (!getTimer().isShutdown()) { getTimer().stop(); } }