...
The license file for this configuration is shown below.
FEATURE Token_lvl1 FEATURE Token_lvl2 FEATURE Product |
According to the way that token-based licenses work, when you check out 1 license of feature Token_lvl1, you will also get 2 licenses of feature Token_lvl2 and 6 licenses of feature Product. Each license of feature Token_lvl1 takes 2 licenses of feature Token_lvl2, and each license of feature Token_lvl2 takes 3 licenses of the feature Product.
Example 1
The following example demonstrates that the order in the queue is important, and all token dependencies must have enough licenses for checkout requests.
- Alice checks out 5 licenses of Token_lvl1. (5 Token_lvl1 -> ; 10 Token_lvl2 -> ; 30 Product)
- Bob wants 3 licenses of Token_lvl1, but there are no licenses available. He goes to the Token_lvl1 queue.
- Charlie wants 2 licenses of Token_lvl1. He also goes to the Token_lvl1 queue.
- Alice returns 2 licenses of Token_lvl1. (2 Token_lvl1 -> ; 4 Token_lvl2 -> ; 12 Product)
- Bob tries to check out 3 licenses of Token_lvl1 (3 Token_lvl1 -> ; 6 Token_lvl2 -> ; 18 Product), but there are only 12 Product licenses available. He is still remains in the Token_lvl1 - queue.
- Charlie tries to check out 2 licenses of Token_lvl1, but he is not the first in the Token_lvl1 queue.*
- Alice returns 1 more license of Token_lvl1. (1 Token_lvl1 -> ; 2 Token_lvl2 -> ; 6 Product)
- Bob wants 3 licenses, and he finally gets them, because there are enough Product licenses available. (3 Token_lvl1 -> ; 6 Token_lvl2 -> ; 18 Product)
- Charlie wants 2 licenses of Token_lvl2, but all licenses are already taken by Alice and Bob. He is still remains in the Token_lvl1 queue.
- Bob returns his 3 licenses of feature Token_lvl1.
- Charlie wants 2 licenses of feature Token_lvl1, and he gets is now able to obtain them. (2 Token_lvl1 -> ; 4 Token_lvl2 -> ; 12 Product)
* With Note that with fast queuing (see example 3) enabled for the Token_lvl1 feature, Charlie would be able to check out the requested licenses.
...
- Alice wants 5 licenses of Token_lvl2 and she gets them. (5 Token_lvl2 -> ; 15 Product)
- Bob wants 2 licenses of Token_lvl1 and he gets them. (2 Token_lvl1 -> ; 4 Token_lvl2 -> ; 12 Product)
- Charlie wants 1 license of Product and he gets it. (1 Product)
- There are 2 licenses of Token_lvl1, 9 licenses of Token_lvl2 and 28 licenses of Product in use.
- Bob wants another 2 licenses of Token_lvl1, but not enough licenses of Product are available. He goes to the Token_lvl1 queue.
- Charlie wants 10 more licenses of Product, but only 2 licenses are available. He goes to the Product queue.
- Alice returns her 5 licenses of Token_lvl2. There are 17 licenses of Product available.
- Charlie requests 10 more licenses of Product before Bob does, and he gets is able to obtain them, because he is in a different queue than Bob.
- Bob wants 2 licenses of Token_lvl1, but there are not enough licenses of Product available. He is still remains in the Token_lvl1 queue.
Example 3
The following is an example of fast queuing.
- Fast queuing is enabled for Token_lvl1.
- Alice takes 5 licenses of Token_lvl1.
- Bob wants 5 licenses of Token_lvl1. There are not enough licenses available. He goes to the Token_lvl1 queue.
- Charlie wants 3 licenses. He also goes to the queue.
- Alice returns 4 of her 5 Token_lvl1 licenses.
- Bob still wants 5 licenses of Token_lvl1. But There are not enough licenses available.
- 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.
Examples of special cases
The following examples illustrate how token-based license checkout queues are handled.
Example 1
Example of case that causes dependency to be removed from the queue
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 This example illustrates cases where a token checkout does not remove the dependency from the queue.
...
- Alice takes all licenses from the token.
- Bob
...
- queues the token licenses and the dependency
...
- licenses.
...
...
- Alice returns all the token licenses.
...
- Bob takes
...
- all the token licenses.
- Bob cannot take more dependency licenses, because this would necessitate that he return token licenses. Therefore, Bob is removed from
...
- the dependency's queue
...
- to prevent blocking the queue indefinitely.
In contrast, the following example illustrates a case
...
Example 2
This example illustrates cases where a token checkout removes does not remove the dependency from the queue.
...
- Alice takes three of the five token licenses.
- Bob takes the remaining two token licenses.
- Charlie
...
- queues the token licenses and
...
- dependency licenses for three licenses.
...
- Bob returns his two licenses.
...
- Charlie takes
...
- the
...
- two licenses
...
- that Bob returned.
- Charlie remains in the dependency's queue
...
- , because it will be able to take the additional license it needs after Alice returns her licenses.