protected void suspendSaving() { try{ this_mon.enter(); suspend_level++; }finally{ this_mon.exit(); } }
public static void removeListener( TRTrackerServerFactoryListener l ) { try{ class_mon.enter(); listeners.remove( l ); }finally{ class_mon.exit(); } }
public void incrementCompletes() { try{ this_mon.enter(); complete_count++; }finally{ this_mon.exit(); } }
public static List<PRUDPPacketHandler> getHandlers() { try{ class_mon.enter(); return( new ArrayList<PRUDPPacketHandler>( receiver_map.values())); }finally{ class_mon.exit(); } }
protected void fileBytesWritten( long num ) { try{ this_mon.enter(); file_bytes_written += num; file_write_count++; }finally{ this_mon.exit(); } }
public boolean isRegistered( NetworkConnectionBase connection ){ try{ connections_mon.enter(); return( connections.containsKey( connection )); } finally{ connections_mon.exit(); } }
public void register( DiskManagerHelper helper ) { try{ instance_mon.enter(); instances.add( helper ); }finally{ instance_mon.exit(); } }
public TRTrackerServerTorrent addLink( String link, TRTrackerServerTorrent target ) { try{ class_mon.enter(); return((TRTrackerServerTorrent)link_map.put( link, target )); }finally{ class_mon.exit(); } }
public TRTrackerServerTorrentImpl getTorrent( String link ) { try{ class_mon.enter(); return((TRTrackerServerTorrentImpl)link_map.get( link )); }finally{ class_mon.exit(); } }
public TRTrackerServerTorrentImpl getTorrent( byte[] hash ) { try{ class_mon.enter(); return((TRTrackerServerTorrentImpl)torrent_map.get(new HashWrapper(hash))); }finally{ class_mon.exit(); } }
public static UpdateMonitor getSingleton(Core core) { try { class_mon.enter(); if (singleton == null) { singleton = new UpdateMonitor(core); } return (singleton); } finally { class_mon.exit(); } }
public void addPasswordListener( SEPasswordListener l ) { try{ this_mon.enter(); password_listeners.add(l); }finally{ this_mon.exit(); } }
public void removePasswordListener( SEPasswordListener l ) { try{ this_mon.enter(); password_listeners.remove(l); }finally{ this_mon.exit(); } }
@Override public void removeListener( DownloadManagerListener listener ) { try{ listeners_mon.enter(); listeners.removeListener(listener); }finally{ listeners_mon.exit(); } }
void restart() { try{ this_mon.enter(); for(int i=0;i<serverSelectors.length;i++) serverSelectors[i].stop(); serverSelectors = new VirtualServerChannelSelector[0]; }finally{ this_mon.exit(); } try{ Thread.sleep( 1000 ); }catch( Throwable t ) { t.printStackTrace(); } start(); }
public void removeDiskListener( DownloadManagerDiskListener listener ) { try{ disk_listeners_mon.enter(); disk_listeners.removeListener( listener ); }finally{ disk_listeners_mon.exit(); } }
@Override public Map getResumeData() { try{ this_mon.enter(); return( torrent.getAdditionalMapProperty(RESUME_KEY)); }finally{ this_mon.exit(); } }
public static ConfigurationManager getInstance(Map data) { try{ class_mon.enter(); if (config == null){ config = new ConfigurationManager(data); } return config; }finally{ class_mon.exit(); } }
@Override public void addCompletionListener(DownloadCompletionListener l) { try { listeners_mon.enter(); this.completion_listeners.add(l); } finally{ listeners_mon.exit(); } }
public static void addCoreRunningListener(CoreRunningListener l) { mon_coreRunningListeners.enter(); try { if (CoreImpl.coreRunningListeners != null) { coreRunningListeners.add(l); return; } } finally { mon_coreRunningListeners.exit(); } l.coreRunning(CoreImpl.getSingleton()); }