Class JobBatchChecker
java.lang.Object
org.mineskin.JobBatchChecker
Shared job checker that batches status lookups across multiple concurrent
MineSkinClient.queue() waitForCompletion calls.
When more than BATCH_THRESHOLD jobs are pending, polls the list
endpoint once per tick instead of hitting the per-job endpoint for each.
Only fetches the full per-job response (which includes the skin object) for
jobs that have transitioned to JobStatus.COMPLETED.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intSwitch to list-based polling when more than this many jobs are pending. -
Constructor Summary
ConstructorsConstructorDescriptionJobBatchChecker(MineSkinClient client, IJobCheckOptions options) JobBatchChecker(MineSkinClient client, IJobCheckOptions options, Runnable onJobFailure) -
Method Summary
Modifier and TypeMethodDescriptionRegister a job to be polled until done.
-
Field Details
-
BATCH_THRESHOLD
public static final int BATCH_THRESHOLDSwitch to list-based polling when more than this many jobs are pending.- See Also:
-
-
Constructor Details
-
JobBatchChecker
-
JobBatchChecker
-
-
Method Details
-
register
Register a job to be polled until done. If the same job id is already registered, returns the existing future.
-