Add documentation for RequiresApplicationThreadExecution

Added a Javadoc comment to the RequiresApplicationThreadExecution interface to clarify its purpose and usage, specifically regarding the need to interrupt CompositePollEvent processing when requiresApplicationThread() returns true.
This commit is contained in:
Kirk True 2025-09-15 14:50:37 -07:00
parent dbc4773a34
commit 09f8cb57cf
1 changed files with 5 additions and 2 deletions

View File

@ -914,10 +914,13 @@ public class ApplicationEventProcessor implements EventProcessor<ApplicationEven
return requestManagers.offsetsRequestManager.updateFetchPositions(deadlineMs);
}
/**
* This interface exists mostly to make the code more intuitive. When {@link #requiresApplicationThread()}
* returns true, the {@link CompositePollEvent} processing needs to be <em>interrupted</em> so that processing
* can return to the application thread.
*/
private interface RequiresApplicationThreadExecution {
boolean requiresApplicationThread();
}
}