Interface QueueSelector


public interface QueueSelector
A QueueSelector is responsible for, given a Runnable and the number of available queues, return which of the queues that Runnable should be placed in.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    getQueue(Runnable command, int queues)
    Must be deterministic—return the same value for the same input.
  • Method Details

    • getQueue

      int getQueue(Runnable command, int queues)
      Must be deterministic—return the same value for the same input.
      Returns:
      given a Runnable a number between 0 .. queues (exclusive)
      Throws:
      NullPointerException - when command is null