Interface AffinityJob

All Superinterfaces:
Runnable
All Known Implementing Classes:
SegmentChainId.PrefetchJob

public interface AffinityJob extends Runnable
Job with affinity for prefetch worker assignment.

Represents a segment prefetch task that has affinity to a specific worker instance for consistent segment allocation.

  • Method Details

    • getJobId

      String getJobId()
      Gets the unique job identifier.
      Returns:
      the job ID
    • affinity

      default String affinity()
      Gets the affinity key for worker assignment.
      Returns:
      the affinity key (defaults to job ID)
    • hungry

      default void hungry()
      Signals this job is hungry and needs prefetch.
    • setHungerTime

      void setHungerTime(long hungerTime)
      Sets the hunger time for this job.
      Parameters:
      hungerTime - time in seconds since epoch
    • getPrefetchWorker

      PrefetchWorker getPrefetchWorker()
      Gets the prefetch worker for this job.
      Returns:
      the prefetch worker
    • setPrefetchWorker

      void setPrefetchWorker(PrefetchWorker prefetchWorker)
      Sets the prefetch worker for this job.
      Parameters:
      prefetchWorker - the worker to set