mirror of https://github.com/apache/kafka.git
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:
parent
dbc4773a34
commit
09f8cb57cf
|
@ -914,10 +914,13 @@ public class ApplicationEventProcessor implements EventProcessor<ApplicationEven
|
||||||
return requestManagers.offsetsRequestManager.updateFetchPositions(deadlineMs);
|
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 {
|
private interface RequiresApplicationThreadExecution {
|
||||||
|
|
||||||
boolean requiresApplicationThread();
|
boolean requiresApplicationThread();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue