Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,14 @@ private EventProcessor(
.orElseGet(HashMap::new);
}

/**
* Receives an {@link Event} from a registered {@link
* io.javaoperatorsdk.operator.processing.event.source.EventSource} and either dispatches it for
* immediate processing or, if this processor has not been {@link #start() started} yet, marks it
* in the resource state so it can be replayed by {@link #handleAlreadyMarkedEvents()} once the
* processor starts. Events received during the start-up window between event source readiness and
* processor start are therefore deferred rather than dropped.
*/
@Override
public synchronized void handleEvent(Event event) {
try {
Expand All @@ -134,7 +142,7 @@ public synchronized void handleEvent(Event event) {
cleanupForDeletedEvent(state.getId());
}
// events are received and marked, but will be processed when started, see start() method.
log.debug("Skipping event: {} because the event processor is not started", event);
log.debug("Deferring event: {} until the event processor starts", event);
return;
}
handleMarkedEventForResource(state);
Expand Down
Loading