Interface CustomPluginContext
public interface CustomPluginContext
A custom plugin context keep track of the state of the 2-phase commit operation
corresponding to a time range where the rated events within the time range
will be processed by plugin. Also has API to provide framework services
such as to allow plugin to log invalid events.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enum
Status for a 2-phase commit formatter operation -
Method Summary
Modifier and TypeMethodDescriptionlong
Get check point timelong
Get end time of the contextGet invalid rated eventslong
Get start time of the contextGet status for a formatter contextboolean
For invalid rated event or notvoid
setInvalidRatedEvents
(List<RatedEventView> ratedEvents) Set invalid rated eventsvoid
setStatus
(CustomPluginContext.Status status) Set success or failure for a formatter context
-
Method Details
-
setStatus
Set success or failure for a formatter context- Parameters:
status
- status enum
-
getStatus
CustomPluginContext.Status getStatus()Get status for a formatter context- Returns:
- success for failure for a formatter context
-
getStartTime
long getStartTime()Get start time of the context- Returns:
- start time
-
getEndTime
long getEndTime()Get end time of the context- Returns:
- end time
-
getCheckPointTime
long getCheckPointTime()Get check point time- Returns:
- end time
-
isInvalidRatedEvent
boolean isInvalidRatedEvent()For invalid rated event or not- Returns:
- true if is invalid rated event processing, otherwise false
-
setInvalidRatedEvents
Set invalid rated events- Parameters:
ratedEvents
- the invalid rated events
-
getInvalidRatedEvents
List<RatedEventView> getInvalidRatedEvents()Get invalid rated events- Returns:
- the invalid rated events
-