本文整理汇总了Java中org.dashbuilder.dataset.events.DataSetStaleEvent类的典型用法代码示例。如果您正苦于以下问题:Java DataSetStaleEvent类的具体用法?Java DataSetStaleEvent怎么用?Java DataSetStaleEvent使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
DataSetStaleEvent类属于org.dashbuilder.dataset.events包,在下文中一共展示了DataSetStaleEvent类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: DataSetDefRegistryCDI
import org.dashbuilder.dataset.events.DataSetStaleEvent; //导入依赖的package包/类
@Inject
public DataSetDefRegistryCDI(@Config("10485760" /* 10 Mb */) int maxCsvLength,
@Named("ioStrategy") IOService ioService,
DataSetProviderRegistryCDI dataSetProviderRegistry,
SchedulerCDI scheduler,
ExceptionManager exceptionManager,
Event<DataSetDefModifiedEvent> dataSetDefModifiedEvent,
Event<DataSetDefRegisteredEvent> dataSetDefRegisteredEvent,
Event<DataSetDefRemovedEvent> dataSetDefRemovedEvent,
Event<DataSetStaleEvent> dataSetStaleEvent) {
super(dataSetProviderRegistry,
scheduler);
this.uuidGenerator = DataSetCore.get().getUuidGenerator();
this.maxCsvLength = maxCsvLength;
this.ioService = ioService;
this.exceptionManager = exceptionManager;
this.dataSetDefModifiedEvent = dataSetDefModifiedEvent;
this.dataSetDefRegisteredEvent = dataSetDefRegisteredEvent;
this.dataSetDefRemovedEvent = dataSetDefRemovedEvent;
this.dataSetStaleEvent = dataSetStaleEvent;
}
示例2: onDataSetStaleEvent
import org.dashbuilder.dataset.events.DataSetStaleEvent; //导入依赖的package包/类
private void onDataSetStaleEvent(@Observes DataSetStaleEvent event) {
checkNotNull("event",
event);
String uuid = event.getDataSetDef().getUUID();
// Remove any stale data existing on the client.
// This will force next lookup requests to push a refreshed data set.
clientDataSetManager.removeDataSet(uuid);
remoteMetadataMap.remove(uuid);
// If a data set has been updated on the sever then fire an event.
// In this case the notification is always send, no matter whether the data set is pushed to the client or not.
dataSetModifiedEvent.fire(new DataSetModifiedEvent(event.getDataSetDef()));
}
示例3: onDataSetStaleEvent
import org.dashbuilder.dataset.events.DataSetStaleEvent; //导入依赖的package包/类
protected void onDataSetStaleEvent(@Observes DataSetStaleEvent event) {
DataSetDef def = event.getDataSetDef();
if (DataSetProviderType.SQL.equals(def.getProvider())) {
String uuid = def.getUUID();
staticDataSetProvider.removeDataSet(uuid);
}
}
示例4: onDataSetDefStale
import org.dashbuilder.dataset.events.DataSetStaleEvent; //导入依赖的package包/类
protected void onDataSetDefStale(DataSetDef def) {
dataSetStaleEvent.fire(new DataSetStaleEvent(def));
}
示例5: onDataSetStaleEvent
import org.dashbuilder.dataset.events.DataSetStaleEvent; //导入依赖的package包/类
private void onDataSetStaleEvent(@Observes DataSetStaleEvent event) {
DataSetDef def = event.getDataSetDef();
if (DataSetProviderType.ELASTICSEARCH.equals(def.getProvider())) {
remove(def.getUUID());
}
}
示例6: onDataSetStaleEvent
import org.dashbuilder.dataset.events.DataSetStaleEvent; //导入依赖的package包/类
protected void onDataSetStaleEvent(@Observes DataSetStaleEvent event) {
DataSetDef def = event.getDataSetDef();
if (DataSetProviderType.CSV.equals(def.getProvider())) {
staticDataSetProvider.removeDataSet(def.getUUID());
}
}
示例7: onDataSetStaleEvent
import org.dashbuilder.dataset.events.DataSetStaleEvent; //导入依赖的package包/类
protected void onDataSetStaleEvent(@Observes DataSetStaleEvent event) {
DataSetDef def = event.getDataSetDef();
if (DataSetProviderType.BEAN.equals(def.getProvider())) {
staticDataSetProvider.removeDataSet(def.getUUID());
}
}
示例8: invalidateDataSet
import org.dashbuilder.dataset.events.DataSetStaleEvent; //导入依赖的package包/类
protected void invalidateDataSet() {
dataSetStaleEvent.fire(new DataSetStaleEvent(dataSetdef));
}