Package org.gudy.azureus2.core3.util

Examples of org.gudy.azureus2.core3.util.AEThread2$JoinLock


              String configAutoKey = TransferSpeedValidator.getActiveAutoUploadParameter(globalManager);

              COConfigurationManager.setParameter(configAutoKey, false);
            }

            final int cValue = ((Integer) new TransferSpeedValidator(configKey,
                new Integer(newSpeed)).getValue()).intValue();

            COConfigurationManager.setParameter(configKey, cValue);

            COConfigurationManager.save();
View Full Code Here


                              TransferSpeedValidator.getActiveAutoUploadParameter(globalManager);
              
                            COConfigurationManager.setParameter( configAutoKey, false );
                          }
                         
                          final int cValue = ((Integer)new TransferSpeedValidator(configKey, (Number)items[i].getData("maxkb")).getValue()).intValue();
                          COConfigurationManager.setParameter(configKey, cValue);
                         

                          COConfigurationManager.save();
                      }
View Full Code Here

    List<SelectedContent> listSelected = new ArrayList<SelectedContent>(dataSources.length);
    for (Object ds : dataSources) {
      if (ds instanceof DownloadManager) {
        listSelected.add(new SelectedContent((DownloadManager) ds));
      } else if (ds instanceof DiskManagerFileInfo) {
        DiskManagerFileInfo fileInfo = (DiskManagerFileInfo) ds;
        listSelected.add(new SelectedContent(fileInfo.getDownloadManager(), fileInfo.getIndex()));
      }
    }
    SelectedContent[] content = listSelected.toArray(new SelectedContent[0]);
    SelectedContentManager.changeCurrentlySelectedContent(tv.getTableID(), content, tv);
  }
View Full Code Here

    if (dms.length == 0 && dataSources.length > 0) {
      List<DiskManagerFileInfo> listFileInfos = new ArrayList<DiskManagerFileInfo>();
      DownloadManager firstFileDM = null;
      for (Object ds : dataSources) {
        if (ds instanceof DiskManagerFileInfo) {
          DiskManagerFileInfo info = (DiskManagerFileInfo) ds;
          // for now, FilesViewMenuUtil.fillmenu can only handle one DM
          if (firstFileDM != null && !firstFileDM.equals(info.getDownloadManager())) {
            break;
          }
          firstFileDM = info.getDownloadManager();
          listFileInfos.add(info);
        }
      }
      if (listFileInfos.size() > 0) {
        FilesViewMenuUtil.fillMenu(tv, menu, firstFileDM,
View Full Code Here

                    sb.append('\n');
                  } catch (TOTorrentException e) {
                  }
                }
              } else if (ds instanceof DiskManagerFileInfo) {
                DiskManagerFileInfo fileInfo = (DiskManagerFileInfo) ds;
                DownloadManager dm = fileInfo.getDownloadManager();
                TOTorrent torrent = dm.getTorrent();
                if (torrent != null) {
                  try {
                    sb.append(torrent.getHashWrapper().toBase32String());
                    sb.append(';');
                    sb.append(fileInfo.getIndex());
                    sb.append('\n');
                    onlyDMs = false;
                  } catch (TOTorrentException e) {
                  }
                }
View Full Code Here

      if (fileInfos != null) {
        DiskManagerFileInfo[] files = fileInfos.getFiles();
        boolean copied = false;
        int pos = 0;
        for (int i = 0; i < files.length; i++) {
          DiskManagerFileInfo fileInfo = files[i];
          if (fileInfo.isSkipped()
              && (fileInfo.getStorageType() == DiskManagerFileInfo.ST_COMPACT || fileInfo.getStorageType() == DiskManagerFileInfo.ST_REORDER_COMPACT)) {
            continue;
          }
          if (pos != i) {
            if ( !copied ){
                // we *MUSTN'T* modify the returned array!!!!
View Full Code Here

    DownloadManager dm = (DownloadManager) ds;
    if (rowCore.getSubItemCount() == 0 && dm.getTorrent() != null
        && !dm.getTorrent().isSimpleTorrent() && rowCore.isVisible()
        && dm.getNumFileInfos() > 0) {
      DiskManagerFileInfoSet fileInfos = dm.getDiskManagerFileInfoSet();
      if (fileInfos != null) {
        DiskManagerFileInfo[] files = fileInfos.getFiles();
        boolean copied = false;
        int pos = 0;
        for (int i = 0; i < files.length; i++) {
          DiskManagerFileInfo fileInfo = files[i];
          if (fileInfo.isSkipped()
View Full Code Here

  public static DiskManager
  create(
    TOTorrent    torrent,
    DownloadManager manager)
  {
    DiskManagerImpl dm = new DiskManagerImpl( torrent, manager );
   
    if ( dm.getState() != DiskManager.FAULTY ){
     
      dm.start();
    }
   
    return dm;
  }
View Full Code Here

          AzureusCore          core,
          AzureusCoreComponent    comp )
          {
            if ( comp instanceof GlobalManager ){
             
              GlobalManager  gm  = (GlobalManager)comp;
             
              gm.addListener( PluginInitializer.this );
            }
          }
      });
   
    core_operation   = _core_operation;
View Full Code Here

  public static void invokeSlider(AzureusCore core, boolean isUpSpeed) {
    final String prefix = MessageText.getString(isUpSpeed
        ? "GeneralView.label.maxuploadspeed"
        : "GeneralView.label.maxdownloadspeed");

    GlobalManager gm = core.getGlobalManager();

    final String configAutoKey = TransferSpeedValidator.getActiveAutoUploadParameter(gm);
    boolean auto = COConfigurationManager.getBooleanParameter(configAutoKey);

    final String configKey = isUpSpeed
        ? TransferSpeedValidator.getActiveUploadParameter(gm)
        : "Max Download Speed KBs";
    int maxBandwidth = COConfigurationManager.getIntParameter(configKey);
    final boolean unlim = (maxBandwidth == 0);
    if (unlim && !isUpSpeed) {
      GlobalManagerStats stats = gm.getStats();
      int dataReceive = stats.getDataReceiveRate();
      if (dataReceive >= 1024) {
        maxBandwidth = dataReceive / 1024;
      }
    }
View Full Code Here

TOP

Related Classes of org.gudy.azureus2.core3.util.AEThread2$JoinLock

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.