public class VAEVariantProcessor extends java.lang.Object implements ValueAddEventProcessor
Constructor and Description |
---|
VAEVariantProcessor(VariantSpec variantSpec,
EventTypeIdGenerator eventTypeIdGenerator,
ConfigurationVariantStream config)
Ctor.
|
Modifier and Type | Method and Description |
---|---|
java.util.Collection<EventBean> |
getSnapshot(EPStatementAgentInstanceHandle createWindowStmtHandle,
Viewable parent)
Handle iteration over revision event contents.
|
EventBean |
getValueAddEventBean(EventBean theEvent)
For use in executing an insert-into, wraps the given event applying the revision event type,
but not yet computing a new revision.
|
EventType |
getValueAddEventType()
Returns the event type that this revision processor generates.
|
void |
onUpdate(EventBean[] newData,
EventBean[] oldData,
NamedWindowRootViewInstance namedWindowRootView,
NamedWindowIndexRepository indexRepository)
Upon new events arriving into a named window (new data), and upon events being deleted
via on-delete (old data), update child views of the root view and apply to index repository as required (fast deletion).
|
void |
removeOldData(EventBean[] oldData,
NamedWindowIndexRepository indexRepository)
Called each time a data window posts a remove stream event, to indicate that a data window
remove an event as it expired according to a specified expiration policy.
|
void |
validateEventType(EventType eventType)
For use in checking insert-into statements, validates that the given type is eligible for revision event.
|
public VAEVariantProcessor(VariantSpec variantSpec, EventTypeIdGenerator eventTypeIdGenerator, ConfigurationVariantStream config)
variantSpec
- specifies how to handle the disparate eventspublic EventType getValueAddEventType()
ValueAddEventProcessor
getValueAddEventType
in interface ValueAddEventProcessor
public void validateEventType(EventType eventType) throws ExprValidationException
ValueAddEventProcessor
validateEventType
in interface ValueAddEventProcessor
eventType
- the type of the event participating in revision event type (or not)ExprValidationException
- if the validation failspublic EventBean getValueAddEventBean(EventBean theEvent)
ValueAddEventProcessor
getValueAddEventBean
in interface ValueAddEventProcessor
theEvent
- to wrappublic void onUpdate(EventBean[] newData, EventBean[] oldData, NamedWindowRootViewInstance namedWindowRootView, NamedWindowIndexRepository indexRepository)
ValueAddEventProcessor
onUpdate
in interface ValueAddEventProcessor
newData
- new eventsoldData
- remove streamnamedWindowRootView
- the root viewindexRepository
- delete and select indexespublic java.util.Collection<EventBean> getSnapshot(EPStatementAgentInstanceHandle createWindowStmtHandle, Viewable parent)
ValueAddEventProcessor
getSnapshot
in interface ValueAddEventProcessor
createWindowStmtHandle
- statement handle for safe iterationparent
- the provider of datapublic void removeOldData(EventBean[] oldData, NamedWindowIndexRepository indexRepository)
ValueAddEventProcessor
removeOldData
in interface ValueAddEventProcessor
oldData
- to removeindexRepository
- the indexes to update