本文整理匯總了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);
}
}