Class QueueSelector
- java.lang.Object
-
- org.forgerock.openam.cts.impl.queue.QueueSelector
-
public final class QueueSelector extends Object
QueueSelector is responsible for selecting an appropriate asynchronous queue for a task to be performed on. This selection is based on the Token ID to ensure that requests to the same Token ID are processed by the same queue. By enforcing this invariant, we can be certain that we can avoid concurrent modification exceptions due to operations being performed on the same Token by different threads. This algorithm is prone to modulus bias towards zero for numbers that are not a power of two. Therefore this algorithm should only be used if this is the case.
-
-
Method Detail
-
select
public static int select(String tokenId, int queues)
-
-