本文整理汇总了Java中com.aelitis.azureus.core.AzureusCore.isStarted方法的典型用法代码示例。如果您正苦于以下问题:Java AzureusCore.isStarted方法的具体用法?Java AzureusCore.isStarted怎么用?Java AzureusCore.isStarted使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.aelitis.azureus.core.AzureusCore
的用法示例。
在下文中一共展示了AzureusCore.isStarted方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: writeTorrentIfExists
import com.aelitis.azureus.core.AzureusCore; //导入方法依赖的package包/类
private static void writeTorrentIfExists(TOTorrent torrent) {
if (!AzureusCoreFactory.isCoreRunning()) {
return;
}
AzureusCore core = AzureusCoreFactory.getSingleton();
if (core == null || !core.isStarted()) {
return;
}
GlobalManager gm = core.getGlobalManager();
if (gm == null || gm.getDownloadManager(torrent) == null) {
return;
}
try {
TorrentUtils.writeToFile(torrent);
} catch (TOTorrentException e) {
Debug.out(e);
}
}
示例2: getTaggedDownloads
import com.aelitis.azureus.core.AzureusCore; //导入方法依赖的package包/类
public Set<DownloadManager>
getTaggedDownloads()
{
AzureusCore core = AzureusCoreFactory.getSingleton();
if (!core.isStarted()) {
return new IdentityHashSet<DownloadManager>();
}
return( new IdentityHashSet<DownloadManager>(getDownloadManagers( core.getGlobalManager().getDownloadManagers())));
}
示例3: ensureInitialised
import com.aelitis.azureus.core.AzureusCore; //导入方法依赖的package包/类
private TranscodeManager
ensureInitialised(
boolean partial )
{
AzureusCore core = AzureusCoreFactory.getSingleton();
if ( core.isStarted()){
initWithCore( core );
}else if ( core.isInitThread()){
Debug.out( "This is bad" );
initWithCore( core );
}
if ( partial ){
long start = SystemTime.getMonotonousTime();
while( !init_sem.reserve(250)){
if ( transcode_manager != null ){
break;
}
if ( SystemTime.getMonotonousTime() - start >= 30*1000 ){
Debug.out( "Timeout waiting for init" );
AEDiagnostics.dumpThreads();
break;
}
}
}else{
if ( !init_sem.reserve( 30*1000 )){
Debug.out( "Timeout waiting for init" );
AEDiagnostics.dumpThreads();
}
}
return( transcode_manager );
}