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

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      int getQueue​(java.lang.Runnable command, int queues)
      Must be deterministic—return the same value for the same input.
    • Method Detail

      • getQueue

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