本文整理汇总了Java中com.espertech.esper.view.CloneableView类的典型用法代码示例。如果您正苦于以下问题:Java CloneableView类的具体用法?Java CloneableView怎么用?Java CloneableView使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
CloneableView类属于com.espertech.esper.view包,在下文中一共展示了CloneableView类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: copySubViews
import com.espertech.esper.view.CloneableView; //导入依赖的package包/类
private static void copySubViews(ExprNode[] criteriaExpressions, String[] propertyNames, Object groupByValues, View originalView, View copyView,
AgentInstanceViewFactoryChainContext agentInstanceContext)
{
for (View subView : originalView.getViews())
{
// Determine if view is our merge view
if (subView instanceof MergeViewMarker)
{
MergeViewMarker mergeView = (MergeViewMarker) subView;
if (ExprNodeUtility.deepEquals(mergeView.getGroupFieldNames(), criteriaExpressions))
{
// We found our merge view - install a new data merge view on top of it
AddPropertyValueView mergeDataView = new AddPropertyValueView(agentInstanceContext, propertyNames, groupByValues, mergeView.getEventType());
// Add to the copied parent subview the view merge data view
copyView.addView(mergeDataView);
// Add to the new merge data view the actual single merge view instance that clients may attached to
mergeDataView.addView(mergeView);
// Add a parent view to the single merge view instance
mergeView.addParentView(mergeDataView);
continue;
}
}
if (!(subView instanceof CloneableView))
{
throw new EPException("Unexpected error copying subview");
}
CloneableView cloneableView = (CloneableView) subView;
View copiedChild = cloneableView.cloneView();
copyView.addView(copiedChild);
// Make the sub views for child
copySubViews(criteriaExpressions, propertyNames, groupByValues, subView, copiedChild, agentInstanceContext);
}
}