Package me.ahoo.cosid.segment.concurrent
Interface PrefetchWorker
- All Known Implementing Classes:
DefaultPrefetchWorker
@ThreadSafe
public interface PrefetchWorker
Worker for prefetching ID segments.
Manages background prefetching of ID segments to ensure segments are available before they are exhausted.
-
Method Summary
Modifier and TypeMethodDescriptionvoidcancel(AffinityJob affinityJob) Cancels a prefetch job.getName()Gets the worker name.voidshutdown()Shuts down the worker.voidsubmit(AffinityJob affinityJob) Submits a job for prefetching.voidwakeup(AffinityJob affinityJob) Wakes up a job for immediate processing.
-
Method Details
-
getName
String getName()Gets the worker name.- Returns:
- the worker name
-
submit
Submits a job for prefetching.- Parameters:
affinityJob- the job to submit
-
cancel
Cancels a prefetch job.- Parameters:
affinityJob- the job to cancel
-
wakeup
Wakes up a job for immediate processing.- Parameters:
affinityJob- the job to wake up
-
shutdown
void shutdown()Shuts down the worker.
-