protected void disableUpdates() { if ( update_event != null ){ update_event.cancel(); update_event = null; } }
private static void removeActiveStream( MagnetOutputStream os ) { synchronized( active_os ){ active_os.remove( os ); if ( active_os.size() == 0 && active_os_event != null ){ active_os_event.cancel(); active_os_event = null; } } }
@Override public void runSupport() { pm_map.remove( pm ); if ( pm_map.size() == 0 ){ timer.cancel(); timer = null; rate_limit = 0; } } });
@Override public void perform(TimerEvent event){ synchronized( save_dir_check_cache ){ if ( save_dir_check_cache.isEmpty()){ save_dir_check_timer.cancel(); save_dir_check_timer = null; }else{ save_dir_check_cache.clear(); } } } });
@Override public void perform( TimerEvent event ) { if ( destroyed && f_ev[0] != null ){ f_ev[0].cancel(); } checkTimeouts(); } });
@Override public void perform(TimerEvent event) { if ( downSpeedCanvas.isDisposed()){ timerEvent.cancel(); }else{ periodicUpdate(); } } });
@Override public void destroy() { timer_event.cancel(); notifyDead(); } }
@Override public void stop() { COConfigurationManager.removeListener( this ); synchronized( this ){ if(event != null){ event.cancel(); event = null; } } }
public static void dispose() { Object[] disposeList = colorsToDispose.toArray(); colorsToDispose.clear(); Utils.disposeSWTObjects(disposeList); if (timerColorCacheChecker != null) { timerColorCacheChecker.cancel(); timerColorCacheChecker = null; } }
@Override public void perform(TimerEvent event) { if ( upSpeedCanvas.isDisposed()){ timerEvent.cancel(); }else{ periodicUpdate(); } } });
@Override public void cancel() { if ( ev != null ){ ev.cancel(); }else{ pev.cancel(); } } }
protected void removeFromActive( NetStatusProtocolTesterBT tester ) { tester.destroy(); synchronized( active_tests ){ active_tests.remove( tester ); if ( active_tests.size() == 0 ){ if ( timer_event != null ){ timer_event.cancel(); timer_event = null; } } } }
private void sessionEnd() { synchronized( this ){ if ( !active ){ return; } updateStats( RT_SESSION_END ); active = false; if ( event != null ){ event.cancel(); event = null; } } }
@Override public void perform( TimerEvent event) { checkTimeouts(); synchronized( tid_map ){ if ( tid_map.size() == 0 ){ timer_event.cancel(); timer_event = null; } } } });
private void sessionEnd() { synchronized( this ){ if ( !active ){ return; } updateStats( RT_SESSION_END ); active = false; if ( event != null ){ event.cancel(); event = null; } } }
@Override public void perform( TimerEvent event ) { if ( drawCanvas.isDisposed()){ if ( update_event != null ){ update_event.cancel(); update_event = null; } }else{ int[] new_values = new int[value_sources.length]; for ( int i=0;i<new_values.length;i++){ new_values[i] = value_sources[i].getValue(); } addIntsValue( new_values ); } } });
protected void remove( LightWeightSeed lws ) { lws.stop(); synchronized( this ){ lws_map.remove( lws.getHash()); if ( lws_map.size() == 0 ){ if ( timer != null ){ timer.cancel(); timer = null; } } } log( "Added LWS: " + lws.getName() + ", " + UrlUtils.getMagnetURI( lws.getHash().getBytes())); }
private void dispose() { PluginInterface defPI = PluginInitializer.getDefaultInterface(); UpdateManager um = defPI.getUpdateManager(); if (updateManagerListener != null) { um.removeListener(updateManagerListener); } if (updateManagerVerificationListener != null) { um.removeVerificationListener(updateManagerVerificationListener); } if (timerAutoCheck != null && !timerAutoCheck.isCancelled()) { timerAutoCheck.cancel(); } }
@Override public void dispose() { super.dispose(); if ( bufferImage != null && ! bufferImage.isDisposed()){ bufferImage.dispose(); } if ( update_event != null ){ update_event.cancel(); update_event = null; } COConfigurationManager.removeParameterListener("Graphics Update",this); COConfigurationManager.removeParameterListener("Stats Graph Dividers" ,this); } }