public class VAEVariantProcessor extends Object implements ValueAddEventProcessor
Modifier and Type | Field and Description |
---|---|
protected VariantEventType |
variantEventType
The event type representing the variant stream.
|
protected VariantSpec |
variantSpec
Specification for the variant stream.
|
Constructor and Description |
---|
VAEVariantProcessor(EventAdapterService eventAdapterService,
VariantSpec variantSpec,
EventTypeIdGenerator eventTypeIdGenerator,
ConfigurationVariantStream config) |
Modifier and Type | Method and Description |
---|---|
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,
EventTableIndexRepository 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,
EventTableIndexRepository indexRepository,
AgentInstanceContext agentInstanceContext)
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.
|
protected final VariantSpec variantSpec
protected VariantEventType variantEventType
public VAEVariantProcessor(EventAdapterService eventAdapterService, VariantSpec variantSpec, EventTypeIdGenerator eventTypeIdGenerator, ConfigurationVariantStream config)
public 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, EventTableIndexRepository indexRepository)
ValueAddEventProcessor
onUpdate
in interface ValueAddEventProcessor
newData
- new eventsoldData
- remove streamnamedWindowRootView
- the root viewindexRepository
- delete and select indexespublic 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, EventTableIndexRepository indexRepository, AgentInstanceContext agentInstanceContext)
ValueAddEventProcessor
removeOldData
in interface ValueAddEventProcessor
oldData
- to removeindexRepository
- the indexes to updateagentInstanceContext
- agent instance context