![]() |
Open Kilda Java Documentation
|
Public Member Functions | |
ResourcePool (final Integer minValue, final Integer maxValue) | |
Integer | allocate () |
Integer | allocate (Integer id) |
Integer | deallocate (final Integer resourceId) |
Set< Integer > | dumpPool () |
String | toString () |
Class represents resource allocator/deallocator.
TODO: (crimi - 2019.04.17) - why is this class in this package?
(crimi - 2019.04.17) - Changing the underlying mechanism here to leverage "max" as the starting point for where to look next. If the counter is at max, then start at zero.
Definition at line 32 of file ResourcePool.java.
org.openkilda.messaging.payload.ResourcePool.ResourcePool | ( | final Integer | minValue, |
final Integer | maxValue | ||
) |
Instance constructor.
minValue | minimum resource id value |
maxValue | maximum resource id value |
Definition at line 47 of file ResourcePool.java.
Integer org.openkilda.messaging.payload.ResourcePool.allocate | ( | ) |
Allocates resource id.
Definition at line 58 of file ResourcePool.java.
Integer org.openkilda.messaging.payload.ResourcePool.allocate | ( | Integer | id | ) |
Allocates resource id.
id | resource id |
Definition at line 88 of file ResourcePool.java.
Integer org.openkilda.messaging.payload.ResourcePool.deallocate | ( | final Integer | resourceId | ) |
Deallocates previously allocated resource id.
resourceId | resource id |
Definition at line 103 of file ResourcePool.java.
Set<Integer> org.openkilda.messaging.payload.ResourcePool.dumpPool | ( | ) |
Returns copy of resource pool.
Definition at line 112 of file ResourcePool.java.
String org.openkilda.messaging.payload.ResourcePool.toString | ( | ) |
Definition at line 120 of file ResourcePool.java.