Package org.gudy.azureus2.core3.util

Examples of org.gudy.azureus2.core3.util.HashWrapper


      public int compare(DownloadManager a, DownloadManager b) {
        return a.getPosition() - b.getPosition();
      }
    });
    for (int i = 0; i < dms.length; i++) {
      DownloadManager dm = dms[i];
      if (dm.getGlobalManager().isMoveableUp(dm)) {
        dm.getGlobalManager().moveUp(dm);
      }
    }

    boolean bForceSort = tv.getSortColumn().getName().equals("#");
    tv.columnInvalidate("#");
View Full Code Here


      });
    }

    int count = globalManager.downloadManagerCount(isSeedingView);
    for (int i = 0; i < dms.length; i++) {
      DownloadManager dm = dms[i];
      int pos = dm.getPosition() + by;
      if (pos < i + 1)
        pos = i + 1;
      else if (pos > count - i)
        pos = count - i;

      newPositions[i] = pos;
    }

    for (int i = 0; i < dms.length; i++) {
      DownloadManager dm = dms[i];
      globalManager.moveTo(dm, newPositions[i]);
    }

    boolean bForceSort = tv.getSortColumn().getName().equals("#");
    tv.columnInvalidate("#");
View Full Code Here

    Object[] managers = globalManager.getDownloadManagers().toArray();
    List<DownloadManager> listRemoves = new ArrayList<DownloadManager>();
    List<DownloadManager> listAdds = new ArrayList<DownloadManager>();
   
    for (int i = 0; i < managers.length; i++) {
      DownloadManager dm = (DownloadManager) managers[i];
   
      boolean bHave = tv.isUnfilteredDataSourceAdded(dm);
      if (!isOurDownloadManager(dm)) {
        if (bHave) {
          listRemoves.add(dm);
View Full Code Here

    Object ds = rowCore.getDataSource(true);
    if (!(ds instanceof DownloadManager)) {
      return;
    }

    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++) {
View Full Code Here

    // required a core, so we assume there's a core here

    List dms = AzureusCoreFactory.getSingleton().getGlobalManager().getDownloadManagers();

    for (int i = 0; i < dms.size(); i++) {
      DownloadManager dm = (DownloadManager) dms.get(i);

      try {
        byte[] share_hash = null;

        if (share.getType() == ShareResource.ST_DIR) {

          share_hash = ((ShareResourceDir) share).getItem().getTorrent().getHash();

        } else if (share.getType() == ShareResource.ST_FILE) {

          share_hash = ((ShareResourceFile) share).getItem().getTorrent().getHash();
        }

        if (Arrays.equals(share_hash, dm.getTorrent().getHash())) {

          UIFunctions uiFunctions = UIFunctionsManager.getUIFunctions();
          if (uiFunctions != null) {
            uiFunctions.openView(UIFunctions.VIEW_DM_DETAILS, 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

   */
  private static int adjustMaxBandWidth(int maxBandwidth,
      GlobalManager globalManager, boolean up_menu) {
    if(maxBandwidth == 0 && !up_menu )
    {
      GlobalManagerStats stats = globalManager.getStats();
      int dataReceive = stats.getDataReceiveRate();
      if (dataReceive < 1024) {
        maxBandwidth = 275;
      } else {
        maxBandwidth = dataReceive / 1024;           
      }
View Full Code Here

        ? 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

 
        crypto_available  = true;
       
      }catch( Throwable e ){
       
        Logger.log(new LogAlert(LogAlert.UNREPEATABLE,
            "Unable to initialise cryptographic framework for magnet-based "
                + "torrent downloads, please re-install Java", e));
      }
    }
   
View Full Code Here

TOP

Related Classes of org.gudy.azureus2.core3.util.HashWrapper

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.