本文整理汇总了Java中com.espertech.esper.view.internal.BufferView类的典型用法代码示例。如果您正苦于以下问题:Java BufferView类的具体用法?Java BufferView怎么用?Java BufferView使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
BufferView类属于com.espertech.esper.view.internal包,在下文中一共展示了BufferView类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setUp
import com.espertech.esper.view.internal.BufferView; //导入依赖的package包/类
public void setUp() {
bufferViewOne = new BufferView(0);
bufferViewTwo = new BufferView(1);
joinExecutionStrategy = new SupportJoinExecutionStrategy();
this.dispatchable = new JoinExecStrategyDispatchable(joinExecutionStrategy, 2);
bufferViewOne.setObserver(dispatchable);
bufferViewTwo.setObserver(dispatchable);
}
示例2: JoinPreloadMethodImpl
import com.espertech.esper.view.internal.BufferView; //导入依赖的package包/类
/**
* Ctor.
* @param numStreams number of streams
* @param joinSetComposer the composer holding stream indexes
*/
public JoinPreloadMethodImpl(int numStreams, JoinSetComposer joinSetComposer)
{
this.numStreams = numStreams;
this.bufferViews = new BufferView[numStreams];
this.joinSetComposer = joinSetComposer;
}
示例3: setUp
import com.espertech.esper.view.internal.BufferView; //导入依赖的package包/类
public void setUp()
{
bufferViewOne = new BufferView(0);
bufferViewTwo = new BufferView(1);
joinExecutionStrategy = new SupportJoinExecutionStrategy();
this.dispatchable = new JoinExecStrategyDispatchable(joinExecutionStrategy, 2);
bufferViewOne.setObserver(dispatchable);
bufferViewTwo.setObserver(dispatchable);
}
示例4: setBuffer
import com.espertech.esper.view.internal.BufferView; //导入依赖的package包/类
public void setBuffer(BufferView buffer, int i) {
}
示例5: handleJoin
import com.espertech.esper.view.internal.BufferView; //导入依赖的package包/类
private JoinPlanResult handleJoin(String[] streamNames,
Viewable[] streamViews,
ResultSetProcessor resultSetProcessor,
AgentInstanceContext agentInstanceContext,
List<StopCallback> stopCallbacks,
StreamJoinAnalysisResult joinAnalysisResult,
boolean isRecoveringResilient) {
final JoinSetComposerDesc joinSetComposerDesc = joinSetComposerPrototype.create(streamViews, false, agentInstanceContext, isRecoveringResilient);
stopCallbacks.add(new StopCallback() {
public void stop() {
joinSetComposerDesc.getJoinSetComposer().destroy();
}
});
JoinSetFilter filter = new JoinSetFilter(joinSetComposerDesc.getPostJoinFilterEvaluator());
OutputProcessViewBase indicatorView = outputProcessViewFactory.makeView(resultSetProcessor, agentInstanceContext);
// Create strategy for join execution
JoinExecutionStrategy execution = new JoinExecutionStrategyImpl(joinSetComposerDesc.getJoinSetComposer(), filter, indicatorView, agentInstanceContext);
// The view needs a reference to the join execution to pull iterator values
indicatorView.setJoinExecutionStrategy(execution);
// Hook up dispatchable with buffer and execution strategy
JoinExecStrategyDispatchable joinStatementDispatch = new JoinExecStrategyDispatchable(execution, statementSpec.getStreamSpecs().length);
agentInstanceContext.getEpStatementAgentInstanceHandle().setOptionalDispatchable(joinStatementDispatch);
JoinPreloadMethod preloadMethod;
if (joinAnalysisResult.isUnidirectional()) {
preloadMethod = new JoinPreloadMethodNull();
} else {
if (!joinSetComposerDesc.getJoinSetComposer().allowsInit()) {
preloadMethod = new JoinPreloadMethodNull();
} else {
preloadMethod = new JoinPreloadMethodImpl(streamNames.length, joinSetComposerDesc.getJoinSetComposer());
}
}
// Create buffer for each view. Point buffer to dispatchable for join.
for (int i = 0; i < statementSpec.getStreamSpecs().length; i++) {
BufferView buffer = new BufferView(i);
streamViews[i].addView(buffer);
buffer.setObserver(joinStatementDispatch);
preloadMethod.setBuffer(buffer, i);
}
return new JoinPlanResult(indicatorView, preloadMethod, joinSetComposerDesc);
}
示例6: setBuffer
import com.espertech.esper.view.internal.BufferView; //导入依赖的package包/类
public void setBuffer(BufferView buffer, int i)
{
}
示例7: instantiate
import com.espertech.esper.view.internal.BufferView; //导入依赖的package包/类
public SubSelectStrategyRealization instantiate(final EPServicesContext services,
Viewable viewableRoot,
final AgentInstanceContext agentInstanceContext,
List<StopCallback> stopCallbackList) {
List<ViewFactory> viewFactoryChain = subSelectHolder.getViewFactoryChain().getViewFactoryChain();
// add "prior" view factory
boolean hasPrior = viewResourceDelegate.getPerStream()[0].getPriorRequests() != null && !viewResourceDelegate.getPerStream()[0].getPriorRequests().isEmpty();
if (hasPrior) {
PriorEventViewFactory priorEventViewFactory = EPStatementStartMethodHelperPrior.getPriorEventViewFactory(agentInstanceContext.getStatementContext(), 1024 + subqueryNumber, viewFactoryChain.size() + 1, viewFactoryChain.isEmpty());
viewFactoryChain = new ArrayList<ViewFactory>(viewFactoryChain);
viewFactoryChain.add(priorEventViewFactory);
}
// create factory chain context to hold callbacks specific to "prior" and "prev"
AgentInstanceViewFactoryChainContext viewFactoryChainContext = AgentInstanceViewFactoryChainContext.create(viewFactoryChain, agentInstanceContext, viewResourceDelegate.getPerStream()[0]);
ViewServiceCreateResult createResult = services.getViewService().createViews(viewableRoot, viewFactoryChain, viewFactoryChainContext, false);
final Viewable subselectView = createResult.getFinalViewable();
// create index/holder table
final EventTable index = pair.getFirst().makeEventTable();
stopCallbackList.add(new SubqueryStopCallback(index));
// create strategy
SubordTableLookupStrategy strategy = pair.getSecond().makeStrategy(index);
SubselectAggregationPreprocessor subselectAggregationPreprocessor = null;
// handle "prior" nodes and their strategies
Map<ExprPriorNode, ExprPriorEvalStrategy> priorNodeStrategies = EPStatementStartMethodHelperPrior.compilePriorNodeStrategies(viewResourceDelegate, new AgentInstanceViewFactoryChainContext[]{viewFactoryChainContext});
// handle "previous" nodes and their strategies
Map<ExprPreviousNode, ExprPreviousEvalStrategy> previousNodeStrategies = EPStatementStartMethodHelperPrevious.compilePreviousNodeStrategies(viewResourceDelegate, new AgentInstanceViewFactoryChainContext[]{viewFactoryChainContext});
AggregationService aggregationService = null;
if (aggregationServiceFactory != null) {
aggregationService = aggregationServiceFactory.getAggregationServiceFactory().makeService(agentInstanceContext, agentInstanceContext.getStatementContext().getMethodResolutionService());
if (!correlatedSubquery) {
SubselectAggregatorView aggregatorView = new SubselectAggregatorView(aggregationService, filterExprEval, agentInstanceContext);
subselectView.addView(aggregatorView);
preload(services, null, aggregatorView, agentInstanceContext);
return new SubSelectStrategyRealization(NULL_ROW_STRATEGY, null, aggregationService, priorNodeStrategies, previousNodeStrategies, subselectView, null);
}
else {
subselectAggregationPreprocessor = new SubselectAggregationPreprocessor(aggregationService, filterExprEval);
}
}
// preload
preload(services, index, subselectView, agentInstanceContext);
StatementAgentInstancePostLoad postLoad = new StatementAgentInstancePostLoad() {
public void executePostLoad() {
preload(services, index, subselectView, agentInstanceContext);
}
};
BufferView bufferView = new BufferView(subSelectHolder.getStreamNumber());
bufferView.setObserver(new SubselectBufferObserver(index));
subselectView.addView(bufferView);
return new SubSelectStrategyRealization(strategy, subselectAggregationPreprocessor, aggregationService, priorNodeStrategies, previousNodeStrategies, subselectView, postLoad);
}
开发者ID:mobile-event-processing,项目名称:Asper,代码行数:67,代码来源:SubSelectStrategyFactoryLocalViewPreloaded.java
示例8: handleJoin
import com.espertech.esper.view.internal.BufferView; //导入依赖的package包/类
private JoinPlanResult handleJoin(String[] streamNames,
Viewable[] streamViews,
ResultSetProcessor resultSetProcessor,
AgentInstanceContext agentInstanceContext,
List<StopCallback> stopCallbacks,
StreamJoinAnalysisResult joinAnalysisResult)
{
final JoinSetComposerDesc joinSetComposerDesc = joinSetComposerPrototype.create(streamViews, false);
stopCallbacks.add(new StopCallback(){
public void stop()
{
joinSetComposerDesc.getJoinSetComposer().destroy();
}
});
JoinSetFilter filter = new JoinSetFilter(joinSetComposerDesc.getPostJoinFilterEvaluator());
OutputProcessViewBase indicatorView = outputProcessViewFactory.makeView(resultSetProcessor, agentInstanceContext);
// Create strategy for join execution
JoinExecutionStrategy execution = new JoinExecutionStrategyImpl(joinSetComposerDesc.getJoinSetComposer(), filter, indicatorView, agentInstanceContext);
// The view needs a reference to the join execution to pull iterator values
indicatorView.setJoinExecutionStrategy(execution);
// Hook up dispatchable with buffer and execution strategy
JoinExecStrategyDispatchable joinStatementDispatch = new JoinExecStrategyDispatchable(execution, statementSpec.getStreamSpecs().size());
agentInstanceContext.getEpStatementAgentInstanceHandle().setOptionalDispatchable(joinStatementDispatch);
JoinPreloadMethod preloadMethod;
if (joinAnalysisResult.getUnidirectionalStreamNumber() >= 0)
{
preloadMethod = new JoinPreloadMethodNull();
}
else
{
preloadMethod = new JoinPreloadMethodImpl(streamNames.length, joinSetComposerDesc.getJoinSetComposer());
}
// Create buffer for each view. Point buffer to dispatchable for join.
for (int i = 0; i < statementSpec.getStreamSpecs().size(); i++)
{
BufferView buffer = new BufferView(i);
streamViews[i].addView(buffer);
buffer.setObserver(joinStatementDispatch);
preloadMethod.setBuffer(buffer, i);
}
return new JoinPlanResult(indicatorView, preloadMethod, joinSetComposerDesc);
}
示例9: setBuffer
import com.espertech.esper.view.internal.BufferView; //导入依赖的package包/类
/**
* Sets the buffee to use.
*
* @param buffer buffer to use
* @param i stream
*/
public void setBuffer(BufferView buffer, int i);
示例10: JoinPreloadMethodImpl
import com.espertech.esper.view.internal.BufferView; //导入依赖的package包/类
/**
* Ctor.
*
* @param numStreams number of streams
* @param joinSetComposer the composer holding stream indexes
*/
public JoinPreloadMethodImpl(int numStreams, JoinSetComposer joinSetComposer) {
this.numStreams = numStreams;
this.bufferViews = new BufferView[numStreams];
this.joinSetComposer = joinSetComposer;
}
示例11: setBuffer
import com.espertech.esper.view.internal.BufferView; //导入依赖的package包/类
/**
* Sets the buffer for a stream to preload events from.
*
* @param view buffer
* @param stream the stream number for the buffer
*/
public void setBuffer(BufferView view, int stream) {
bufferViews[stream] = view;
}
示例12: setBuffer
import com.espertech.esper.view.internal.BufferView; //导入依赖的package包/类
/**
* Sets the buffee to use.
* @param buffer buffer to use
* @param i stream
*/
public void setBuffer(BufferView buffer, int i);
示例13: setBuffer
import com.espertech.esper.view.internal.BufferView; //导入依赖的package包/类
/**
* Sets the buffer for a stream to preload events from.
* @param view buffer
* @param stream the stream number for the buffer
*/
public void setBuffer(BufferView view, int stream)
{
bufferViews[stream] = view;
}