Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Fast queuing is enabled for Token_lvl1.
  2. Alice takes 5 licenses of Token_lvl1.
  3. Bob wants 5 licenses of Token_lvl1. There are not enough licenses available. He goes to the Token_lvl1 queue.
  4. Charlie wants 3 licenses. He also goes to the queue.
  5. Alice returns 4 of her 5 Token_lvl1 licenses.
  6. Bob still wants 5 licenses of Token_lvl1. But There are not enough licenses available.
  7. Charlie wants only 3 licenses of Token_lvl1, but he is not first in the queue. Fortunately, fast queueing is enabled for Token_lvl1. Charlie gets 3 licenses.

...

Exceptions

Queuing token based-licenses generally does not affect its dependency queues; however, the following example illustrates an exception to this generality that does cause the dependency to be removed examples illustrate exceptions to this generality. We’ll continue using the same example setup as we used above.

Example 1

The following example illustrates a case where successful token checkout removes the dependency from the queue. 

  1. Alice takes

...

  1. 4 licenses of Token_lvl1.
  2. Bob takes 6 licenses of Product.
  3. Charlie wants 4 licenses of Token_lvl1, but there are no licenses available. Charlie goes to the Token_lvl1 queue.
  4. Charlie also wants 24 licenses of Product. There are no licenses available, so he goes to the Product queue.
  5. Charlie is now in two queues: Token_lvl1 queue and Product queue.
  6. Alice wants 6 licenses of Product, but no licenses are available. Alice goes to the Product queue.
  7. Alice returns 4 licenses of Token_lvl1.
  8. Charlie takes 4 licenses of Token_lvl1. This removes him from the Token_lvl1 queue.
  9. Charlie is still in the Product queue, but now it’s impossible for him to take any Product license, because he already has 24 of them through the Token_lvl1, and he requested 24 more. This is more than Product has; therefore, Charlie is also removed from the Product queue.

The client is removed from the token dependency queue only when the total number of token dependency licenses minus the number of licenses the client has in use is less than the client's requested number of licenses that are in the token dependency queue.

Example 2

The In contrast, the following example illustrates a case where a token successful checkout does not remove the dependency from the queue. 

  1. Alice takes three of the five token licenses3 licenses of Token_lvl1.
  2. Bob takes the remaining two token licenses2 licenses of Token_lvl1.
  3. Charlie wants 2 licenses of Token_lvl1, but there are no licenses available. Charlie goes to the Token_lvl1 queue.
  4. Charlie wants 12 licenses of Product, but there are no licenses available. Charlie goes to the Product queue. queues the token licenses and dependency licenses for three licenses. 
  5. Bob returns his two 2 licenses of Token_lvl1.
  6. Charlie takes the two licenses that Bob returned.2 licenses of Token_lvl1 and exits the Token_lvl1 queue.
  7. Charlie wants 12 licenses of Product, but there are no licenses available. He remains in the Product queue.
  8. Charlie continues to remain in the Product queue, because when Alice returns her Token_lvl1 licenses, Charlie Charlie remains in the dependency's queue, because it will be able to take the additional license it needs after Alice returns her get the requested 12 Product licenses.

In this example, it is still possible for Charlie to get the Product licenses after he has checked out some of the licenses.