com.espertech.esper.event.vaevent
Class VAERevisionProcessorDeclared

java.lang.Object
  extended by com.espertech.esper.event.vaevent.VAERevisionProcessorBase
      extended by com.espertech.esper.event.vaevent.VAERevisionProcessorDeclared
All Implemented Interfaces:
ValueAddEventProcessor

public class VAERevisionProcessorDeclared
extends VAERevisionProcessorBase
implements ValueAddEventProcessor

Provides overlay strategy for property group-based versioning.


Field Summary
 
Fields inherited from class com.espertech.esper.event.vaevent.VAERevisionProcessorBase
eventAdapterService, revisionEventType, revisionEventTypeName, revisionSpec, typeDescriptors
 
Constructor Summary
VAERevisionProcessorDeclared(java.lang.String revisionEventTypeName, RevisionSpec spec, StatementStopService statementStopService, EventAdapterService eventAdapterService, EventTypeIdGenerator eventTypeIdGenerator)
          Ctor.
 
Method Summary
static java.util.Map<java.lang.String,RevisionPropertyTypeDesc> createPropertyDescriptors(RevisionSpec spec, PropertyGroupDesc[] groups)
          Creates property descriptors for revision.
 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.
 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)
          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.
 
Methods inherited from class com.espertech.esper.event.vaevent.VAERevisionProcessorBase
getEventAdapterService, getValueAddEventType, validateEventType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.espertech.esper.event.vaevent.ValueAddEventProcessor
getValueAddEventType, validateEventType
 

Constructor Detail

VAERevisionProcessorDeclared

public VAERevisionProcessorDeclared(java.lang.String revisionEventTypeName,
                                    RevisionSpec spec,
                                    StatementStopService statementStopService,
                                    EventAdapterService eventAdapterService,
                                    EventTypeIdGenerator eventTypeIdGenerator)
Ctor.

Parameters:
revisionEventTypeName - name
spec - specification
statementStopService - for stop handling
eventAdapterService - for nested property handling
Method Detail

getValueAddEventBean

public EventBean getValueAddEventBean(EventBean theEvent)
Description copied from interface: ValueAddEventProcessor
For use in executing an insert-into, wraps the given event applying the revision event type, but not yet computing a new revision.

Specified by:
getValueAddEventBean in interface ValueAddEventProcessor
Parameters:
theEvent - to wrap
Returns:
revision event bean

onUpdate

public void onUpdate(EventBean[] newData,
                     EventBean[] oldData,
                     NamedWindowRootViewInstance namedWindowRootView,
                     EventTableIndexRepository indexRepository)
Description copied from interface: ValueAddEventProcessor
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).

Specified by:
onUpdate in interface ValueAddEventProcessor
Parameters:
newData - new events
oldData - remove stream
namedWindowRootView - the root view
indexRepository - delete and select indexes

getSnapshot

public java.util.Collection<EventBean> getSnapshot(EPStatementAgentInstanceHandle createWindowStmtHandle,
                                                   Viewable parent)
Description copied from interface: ValueAddEventProcessor
Handle iteration over revision event contents.

Specified by:
getSnapshot in interface ValueAddEventProcessor
Parameters:
createWindowStmtHandle - statement handle for safe iteration
parent - the provider of data
Returns:
collection to iterate

removeOldData

public void removeOldData(EventBean[] oldData,
                          EventTableIndexRepository indexRepository)
Description copied from interface: ValueAddEventProcessor
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.

Specified by:
removeOldData in interface ValueAddEventProcessor
Parameters:
oldData - to remove
indexRepository - the indexes to update

createPropertyDescriptors

public static java.util.Map<java.lang.String,RevisionPropertyTypeDesc> createPropertyDescriptors(RevisionSpec spec,
                                                                                                 PropertyGroupDesc[] groups)
Creates property descriptors for revision.

Parameters:
spec - specifies revision
groups - the groups that group properties
Returns:
map of property and descriptor

© 2006-2015 EsperTech Inc.
All rights reserved.
Visit us at espertech.com