Package org.gudy.azureus2.core3.disk

Examples of org.gudy.azureus2.core3.disk.DiskManagerReadRequest


  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


    DownloadManager dm = (DownloadManager) ci.torrents.get(number - 1);
    String name = dm.getDisplayName();
    if (name == null)
      name = "?";
   
    GlobalManager  gm = dm.getGlobalManager();

    if (moveto) {
      gm.moveTo(dm, nmoveto - 1);
      gm.fixUpDownloadManagerPositions();
      ci.out.println("> Torrent #" + Integer.toString(number) + " (" + name + ") moved to #" + Integer.toString(nmoveto) + ".");
    } else if (ncommand > 0) {
      if (gm.isMoveableUp(dm)) {
        while (gm.isMoveableUp(dm))
          gm.moveUp(dm);
        gm.fixUpDownloadManagerPositions();
        ci.out.println("> Torrent #" + Integer.toString(number) + " (" + name + ") moved to top.");
      } else {
        ci.out.println("> Torrent #" + Integer.toString(number) + " (" + name + ") already at top.");
      }
    } else {
      if (gm.isMoveableDown(dm)) {
        while (gm.isMoveableDown(dm))
          gm.moveDown(dm);
        gm.fixUpDownloadManagerPositions();
        ci.out.println("> Torrent #" + Integer.toString(number) + " (" + name + ") moved to bottom.");
      } else {
        ci.out.println("> Torrent #" + Integer.toString(number) + " (" + name + ") already at bottom.");
      }
    }
View Full Code Here

      }
     
      ci.torrents.clear();
      ci.torrents.addAll( shown_torrents );
     
      GlobalManager  gm = ci.getGlobalManager();
     
      ci.out.println("Total Speed (down/up): " + DisplayFormatters.formatByteCountToKiBEtcPerSec(gm.getStats().getDataReceiveRate() + gm.getStats().getProtocolReceiveRate() ) + " / " + DisplayFormatters.formatByteCountToKiBEtcPerSec(gm.getStats().getDataSendRate() + gm.getStats().getProtocolSendRate() ));

      ci.out.println("Transferred Volume (down/up/discarded): " + DisplayFormatters.formatByteCountToKiBEtc(totalReceived) + " / " + DisplayFormatters.formatByteCountToKiBEtc(totalSent) + " / " + DisplayFormatters.formatByteCountToKiBEtc(totalDiscarded));
      ci.out.println("Total Connected Peers (seeds/peers): " + Integer.toString(connectedSeeds) + " / " + Integer.toString(connectedPeers));
      ci.out.println("> -----");
    } else if (subCommand.equalsIgnoreCase("dht") || subCommand.equalsIgnoreCase("d")) {
View Full Code Here

        public void handleEvent(Event e) {
          if (!AzureusCoreFactory.isCoreRunning()) {
            return;
          }
          AzureusCore core = AzureusCoreFactory.getSingleton();
          GlobalManager globalManager = core.getGlobalManager();
         
          SelectableSpeedMenu.generateMenuItems(menuUpSpeed, core,
              globalManager, true);
        }
      });
      statusUp.setMenu(menuUpSpeed);
    } else {

      statusUp.addMouseListener(new MouseAdapter() {
        public void mouseDown(MouseEvent e) {
          if (!(e.button == 3 || (e.button == 1 && e.stateMask == SWT.CONTROL))) {
            return;
          }
          Event event = new Event();
          event.type = SWT.MouseUp;
          event.widget = e.widget;
          event.stateMask = e.stateMask;
          event.button = e.button;
          e.widget.getDisplay().post(event);

          CoreWaiterSWT.waitForCoreRunning(new AzureusCoreRunningListener() {
            public void azureusCoreRunning(AzureusCore core) {
              SelectableSpeedMenu.invokeSlider(core, true);
            }
          });
        }
      });
    }

    if (bSpeedMenu) {
      final Menu menuDownSpeed = new Menu(statusBar.getShell(), SWT.POP_UP);
      menuDownSpeed.addListener(SWT.Show, new Listener() {
        public void handleEvent(Event e) {
          if (!AzureusCoreFactory.isCoreRunning()) {
            return;
          }
          AzureusCore core = AzureusCoreFactory.getSingleton();
          GlobalManager globalManager = core.getGlobalManager();

          SelectableSpeedMenu.generateMenuItems(menuDownSpeed, core,
              globalManager, false);
        }
      });
View Full Code Here


    // UL/DL Status Sections
    if (AzureusCoreFactory.isCoreRunning()) {
      AzureusCore core = AzureusCoreFactory.getSingleton();
      GlobalManager gm = core.getGlobalManager();
      GlobalManagerStats stats = gm.getStats();

      int dl_limit = NetworkManager.getMaxDownloadRateBPS() / 1024;
      long rec_data = stats.getDataReceiveRate();
      long rec_prot = stats.getProtocolReceiveRate();
     
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

          try{
            SESecurityManager.createSelfSignedCertificate( alias, dn, strength );
           
            close(true );
           
            Logger.log(new LogAlert(LogAlert.UNREPEATABLE,
                LogAlert.AT_INFORMATION, MessageText
                    .getString("security.certcreate.createok")
                    + "\n" + alias + ":" + strength + "\n"
                    + dn + "\n" + SystemTime.getCurrentTime()));
           
          }catch( Throwable f ){
           
            Logger.log(new LogAlert(LogAlert.UNREPEATABLE, MessageText
                .getString("security.certcreate.createfail")
                + "\n" + SystemTime.getCurrentTime(), f));
          }
        }
      });
View Full Code Here

      try{
        ((ShareResource)shares[i]).delete();
       
      }catch( Throwable e ){
       
        Logger.log(new LogAlert(shares[i], false,
            "{globalmanager.download.remove.veto}", e));
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.gudy.azureus2.core3.disk.DiskManagerReadRequest

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.