Class IncomingEvent
java.lang.Object
org.odpi.openmetadata.repositoryservices.connectors.openmetadatatopic.IncomingEvent
- Direct Known Subclasses:
KafkaIncomingEvent
An event that was received from a connector
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addAsyncProcessingResult
(OMRSFuture future) Adds aFuture
for the processing of this event by someOMRSInstanceEventProcessor
long
Gets the time when thisIncomingEvent
instance was created.getJson()
Gets the json for the eventGets the unique message id for this event.boolean
hasTimeElapsedSinceCreation
(long elapsedTimeMs) Checks whether the given amount of time has elapsed since the event was createdboolean
Checks whether all processing for this event has completed.void
setState
(IncomingEventState state) Updates the state of the event
-
Constructor Details
-
IncomingEvent
Constructor- Parameters:
json
- the json for the eventmessageId
- identifier
-
-
Method Details
-
getJson
Gets the json for the event- Returns:
- Json String
-
addAsyncProcessingResult
Adds aFuture
for the processing of this event by someOMRSInstanceEventProcessor
- Parameters:
future
- theFuture
to add
-
setState
Updates the state of the event- Parameters:
state
- the new state
-
getCreationTime
public long getCreationTime()Gets the time when thisIncomingEvent
instance was created. This is different from the time when the message was generated.- Returns:
- time as a long
-
getMessageId
Gets the unique message id for this event.- Returns:
- messageId
-
hasTimeElapsedSinceCreation
public boolean hasTimeElapsedSinceCreation(long elapsedTimeMs) Checks whether the given amount of time has elapsed since the event was created- Parameters:
elapsedTimeMs
- the elapsed time to check, in milliseconds- Returns:
- result
-
isFullyProcessed
public boolean isFullyProcessed()Checks whether all processing for this event has completed.- Returns:
- whether all processing for this event has completed
-