Package kafka.server.share
Class DelayedShareFetch
java.lang.Object
org.apache.kafka.server.util.timer.TimerTask
org.apache.kafka.server.purgatory.DelayedOperation
kafka.server.share.DelayedShareFetch
- All Implemented Interfaces:
Runnable
public class DelayedShareFetch
extends org.apache.kafka.server.purgatory.DelayedOperation
A delayed share fetch operation has been introduced in case there is a share fetch request which cannot be completed instantaneously.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.kafka.server.purgatory.DelayedOperation
org.apache.kafka.server.purgatory.DelayedOperation.Action -
Field Summary
Fields inherited from class org.apache.kafka.server.util.timer.TimerTask
delayMs -
Method Summary
Modifier and TypeMethodDescriptionvoidComplete the share fetch operation by fetching records for all partitions in the share fetch request irrespective of whether they have any acquired records.voidbooleanTry to complete the fetch operation if we can acquire records for any partition in the share fetch request.Methods inherited from class org.apache.kafka.server.purgatory.DelayedOperation
forceComplete, isCompleted, runMethods inherited from class org.apache.kafka.server.util.timer.TimerTask
cancel, isCancelled
-
Method Details
-
onExpiration
public void onExpiration()- Specified by:
onExpirationin classorg.apache.kafka.server.purgatory.DelayedOperation
-
onComplete
public void onComplete()Complete the share fetch operation by fetching records for all partitions in the share fetch request irrespective of whether they have any acquired records. This is called when the fetch operation is forced to complete either because records can be acquired for some partitions or due to MaxWaitMs timeout.- Specified by:
onCompletein classorg.apache.kafka.server.purgatory.DelayedOperation
-
tryComplete
public boolean tryComplete()Try to complete the fetch operation if we can acquire records for any partition in the share fetch request.- Specified by:
tryCompletein classorg.apache.kafka.server.purgatory.DelayedOperation
-