本文整理汇总了Java中gov.nih.nci.cagrid.syncgts.core.SyncGTS.syncOnce方法的典型用法代码示例。如果您正苦于以下问题:Java SyncGTS.syncOnce方法的具体用法?Java SyncGTS.syncOnce怎么用?Java SyncGTS.syncOnce使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gov.nih.nci.cagrid.syncgts.core.SyncGTS
的用法示例。
在下文中一共展示了SyncGTS.syncOnce方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: SyncGTSImpl
import gov.nih.nci.cagrid.syncgts.core.SyncGTS; //导入方法依赖的package包/类
public SyncGTSImpl() throws RemoteException {
try {
this.configuration = SyncGTSConfiguration.getConfiguration();
SyncGTSDefault.setServiceSyncDescriptionLocation(SyncGTSConfiguration.getConfiguration().getSyncDescription());
SyncDescription description = SyncGTSDefault.getSyncDescription();
try {
SyncGTS sync = SyncGTS.getInstance();
if ((this.configuration.getPerformFirstSync() != null)
&& (this.configuration.getPerformFirstSync().equalsIgnoreCase("true"))) {
sync.syncOnce(description);
}
sync.syncAndResyncInBackground(description, true);
} catch (Exception e) {
e.printStackTrace();
}
} catch (Exception ex) {
ex.printStackTrace();
throw new RemoteException("Error Starting SyncGTS Service: " + ex.getMessage());
}
}
示例2: configureGlobusCertificates
import gov.nih.nci.cagrid.syncgts.core.SyncGTS; //导入方法依赖的package包/类
private void configureGlobusCertificates() throws Exception {
File globusCertificateDir = Utils.getTrustedCerificatesDirectory();
File gridTargetCertsDir = new File(gaardsConfigurationDirectory, targetGrid + File.separator + "certificates");
Utils.copyDirectory(gridTargetCertsDir, globusCertificateDir);
SyncGTSDefault.setServiceSyncDescriptionLocation(gaardsConfigurationDirectory.getAbsolutePath()
+ File.separator + targetGrid + File.separator
+ "sync-description.xml");
SyncDescription description = SyncGTSDefault.getSyncDescription();
SyncGTS sync = SyncGTS.getInstance();
sync.syncOnce(description);
}
示例3: setDefaultGrid
import gov.nih.nci.cagrid.syncgts.core.SyncGTS; //导入方法依赖的package包/类
private void setDefaultGrid() {
try {
File targetGridDirectory = new File(GAARDSApplication.getGAARDSConfigurationDirectory(), grid.getSystemName());
File gridSyncGTDCertsDir = Utils.getTrustedCerificatesDirectory();
File gridTargetCertsDir = new File(targetGridDirectory, "certificates");
Utils.copyDirectory(gridTargetCertsDir, gridSyncGTDCertsDir);
// sync with trust fabric
SyncGTSDefault
.setServiceSyncDescriptionLocation(targetGridDirectory.getAbsolutePath()
+ File.separator + "sync-description.xml");
SyncDescription description = SyncGTSDefault.getSyncDescription();
SyncGTS sync = SyncGTS.getInstance();
sync.syncOnce(description);
// reload
GAARDSApplication.getContext().getConfigurationManager()
.setActiveConfiguration(grid.getSystemName());
GAARDSApplication.getContext().getConfigurationManager().reload();
ServicesManager.getInstance().syncWithUpdatedConfiguration();
GAARDSApplication.setTargetGrid(grid.getSystemName());
} catch (Exception e) {
ErrorDialog.showError(e);
FaultUtil.logFault(log, e);
}
}