当前位置: 首页>>代码示例>>Java>>正文


Java GlobalManagerStats类代码示例

本文整理汇总了Java中org.gudy.azureus2.core3.global.GlobalManagerStats的典型用法代码示例。如果您正苦于以下问题:Java GlobalManagerStats类的具体用法?Java GlobalManagerStats怎么用?Java GlobalManagerStats使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


GlobalManagerStats类属于org.gudy.azureus2.core3.global包,在下文中一共展示了GlobalManagerStats类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: initialize

import org.gudy.azureus2.core3.global.GlobalManagerStats; //导入依赖的package包/类
public static void 
initialize(
	AzureusCore 		core,
	GlobalManagerStats	stats )
{
	overall_stats 	= new OverallStatsImpl( core, stats );
	longterm_stats	= new LongTermStatsImpl( core, stats );
}
 
开发者ID:thangbn,项目名称:Direct-File-Downloader,代码行数:9,代码来源:StatsFactory.java

示例2: isDataFlowing

import org.gudy.azureus2.core3.global.GlobalManagerStats; //导入依赖的package包/类
private boolean isDataFlowing() {
	if (core == null) {
		return false;
	}
	GlobalManagerStats stats = core.getGlobalManager().getStats();
	int dataSendRate = stats.getDataSendRate();
	int dataReceiveRate = stats.getDataReceiveRate();
	if (dataSendRate > 0 || dataReceiveRate > 0) {
		// data flowing, no need to check smooth rate
		return true;
	}
	long smoothedReceiveRate = stats.getSmoothedReceiveRate();
	long smoothedSendRate = stats.getSmoothedSendRate();
	return smoothedReceiveRate > 1024 && smoothedSendRate > 1024;
}
 
开发者ID:vuze,项目名称:vuze-remote-for-android,代码行数:16,代码来源:VuzeService.java

示例3: adjustMaxBandWidth

import org.gudy.azureus2.core3.global.GlobalManagerStats; //导入依赖的package包/类
/**
 * @param configKey
 * @return
 *
 * @since 3.0.1.7
 */
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;      			
 		}
   }
   return maxBandwidth;
}
 
开发者ID:AcademicTorrents,项目名称:AcademicTorrents-Downloader,代码行数:21,代码来源:SelectableSpeedMenu.java

示例4: refresh0

import org.gudy.azureus2.core3.global.GlobalManagerStats; //导入依赖的package包/类
protected void refresh0() {
	GlobalManagerStats stats = g_manager.getStats();
	this.updateSpeedLabel(down_speed, stats.getDataReceiveRate(),stats.getProtocolReceiveRate());
	this.updateSpeedLabel(up_speed, stats.getDataSendRate(),stats.getProtocolSendRate());
	
	long	min_eta = Long.MAX_VALUE;
	int		num_downloading = 0;
	
	List<DownloadManager> dms = g_manager.getDownloadManagers();
	for ( DownloadManager dm: dms ){
		if ( dm.getState() == DownloadManager.STATE_DOWNLOADING ){
			
			num_downloading++;
			
			long eta = dm.getStats().getSmoothedETA();
			
			if ( eta < min_eta ){
				
				min_eta = eta;
			}
		}
	}
	
	if ( min_eta == Long.MAX_VALUE ){
		
		min_eta = Constants.CRAPPY_INFINITE_AS_LONG;
	}
	next_eta.setText(num_downloading==0?"":DisplayFormatters.formatETA(min_eta));
}
 
开发者ID:AcademicTorrents,项目名称:AcademicTorrents-Downloader,代码行数:30,代码来源:AllTransfersBar.java


注:本文中的org.gudy.azureus2.core3.global.GlobalManagerStats类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。