本文整理匯總了Java中org.dashbuilder.dataset.def.DataSetDef.getRefreshTimeAmount方法的典型用法代碼示例。如果您正苦於以下問題:Java DataSetDef.getRefreshTimeAmount方法的具體用法?Java DataSetDef.getRefreshTimeAmount怎麽用?Java DataSetDef.getRefreshTimeAmount使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.dashbuilder.dataset.def.DataSetDef
的用法示例。
在下文中一共展示了DataSetDef.getRefreshTimeAmount方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: onDataSetPushOkEvent
import org.dashbuilder.dataset.def.DataSetDef; //導入方法依賴的package包/類
private void onDataSetPushOkEvent(@Observes DataSetPushOkEvent event) {
checkNotNull("event",
event);
checkNotNull("event",
event.getDataSetMetadata());
DataSetMetadata metadata = event.getDataSetMetadata();
DataSetDef def = metadata.getDefinition();
TimeAmount timeFrame = def.getRefreshTimeAmount();
if (timeFrame == null || timeFrame.toMillis() > 60000) {
int estimazedSizeKbs = event.getDataSetMetadata().getEstimatedSize() / 1000;
workbenchNotification.fire(new NotificationEvent(
AppConstants.INSTANCE.gallerywidget_dataset_loaded(def.getProvider().toString(),
estimazedSizeKbs),
INFO));
}
}
示例2: onDataSetModifiedEvent
import org.dashbuilder.dataset.def.DataSetDef; //導入方法依賴的package包/類
private void onDataSetModifiedEvent(@Observes DataSetModifiedEvent event) {
checkNotNull("event",
event);
DataSetDef def = event.getDataSetDef();
String targetUUID = event.getDataSetDef().getUUID();
TimeAmount timeFrame = def.getRefreshTimeAmount();
boolean noRealTime = timeFrame == null || timeFrame.toMillis() > 60000;
if ((!def.isRefreshAlways() || noRealTime) && widget != null && widget.feedsFrom(targetUUID)) {
workbenchNotification.fire(new NotificationEvent(AppConstants.INSTANCE.gallerywidget_dataset_modif(),
INFO));
widget.redrawAll();
}
}