public void Updated(IStreamRelativeAccess iStreamRelativeAccess, EventBean[] newData) { // remove data posted from the last Update EventBean[] lastNewData = _eventsByAccessor.Get(iStreamRelativeAccess); if (lastNewData != null) { for (int i = 0; i < lastNewData.Length; i++) { _accessorByEvent.Remove(lastNewData[i]); } } if (newData == null) { return; } // hold accessor per event for querying for (int i = 0; i < newData.Length; i++) { _accessorByEvent.Put(newData[i], iStreamRelativeAccess); } // save new data for access to later removal _eventsByAccessor.Put(iStreamRelativeAccess, newData); }
public View MakeView(AgentInstanceViewFactoryChainContext agentInstanceViewFactoryContext) { IStreamRelativeAccess relativeAccessByEvent = ViewServiceHelper.GetOptPreviousExprRelativeAccess(agentInstanceViewFactoryContext); return(new TimeLengthBatchView( this, agentInstanceViewFactoryContext, timeDeltaComputation, NumberOfEvents, isForceUpdate, isStartEager, relativeAccessByEvent)); }
public void SetUp() { _access = new IStreamRelativeAccess((acess, newData) => { }); _events = new EventBean[100]; for (int i = 0; i < _events.Length; i++) { _events[i] = SupportEventBeanFactory.CreateObject(new SupportBean()); } }
/// <summary>Returns the access into window contents given an event. </summary> /// <param name="theEvent">to which the method returns relative access from</param> /// <returns>buffer</returns> public IStreamRelativeAccess GetAccessor(EventBean theEvent) { IStreamRelativeAccess iStreamRelativeAccess = _accessorByEvent.Get(theEvent); if (iStreamRelativeAccess == null) { throw new IllegalStateException("Accessor for window random access not found for event " + theEvent); } return(iStreamRelativeAccess); }
public View MakeView(AgentInstanceViewFactoryChainContext agentInstanceViewFactoryContext) { IStreamRelativeAccess relativeAccessByEvent = ViewServiceHelper.GetOptPreviousExprRelativeAccess(agentInstanceViewFactoryContext); if (agentInstanceViewFactoryContext.IsRemoveStream) { return(new LengthBatchViewRStream(agentInstanceViewFactoryContext, this, Size)); } else { return(new LengthBatchView(agentInstanceViewFactoryContext, this, Size, relativeAccessByEvent)); } }
public View MakeView(AgentInstanceViewFactoryChainContext agentInstanceViewFactoryContext) { IStreamRelativeAccess relativeAccessByEvent = ViewServiceHelper.GetOptPreviousExprRelativeAccess(agentInstanceViewFactoryContext); if (agentInstanceViewFactoryContext.IsRemoveStream) { return(new TimeBatchViewRStream(this, agentInstanceViewFactoryContext, timeDeltaComputation, OptionalReferencePoint, isForceUpdate, isStartEager)); } else { return(new TimeBatchView(this, agentInstanceViewFactoryContext, timeDeltaComputation, OptionalReferencePoint, isForceUpdate, isStartEager, relativeAccessByEvent)); } }
public View MakeView(AgentInstanceViewFactoryChainContext agentInstanceViewFactoryContext) { IStreamRelativeAccess relativeAccessByEvent = ViewServiceHelper.GetOptPreviousExprRelativeAccess(agentInstanceViewFactoryContext); return(new ExternallyTimedBatchView(this, TimestampExpression, TimestampExpressionEval, TimeDeltaComputation, OptionalReferencePoint, relativeAccessByEvent, agentInstanceViewFactoryContext)); }
/// <summary> /// Returns the access into window contents given an event. /// </summary> /// <param name="theEvent">to which the method returns relative access from</param> /// <returns>buffer</returns> public IStreamRelativeAccess GetAccessor(EventBean theEvent) { IStreamRelativeAccess iStreamRelativeAccess = _accessorByEvent.Get(theEvent); return(iStreamRelativeAccess); }