public interface VniReservationService
reserve()
and later unreserve
it with unreserve(Vni)
.reserve(Vni, Vni)
and
later unreserve it with unreserve(VniRange)
.list()
Modifier and Type | Method and Description |
---|---|
List<VniRange> |
list()
Returns a list of ranges of VNIs that have been reserved.
|
Vni |
reserve()
Reserves and return an available VNI.
|
VniRange |
reserve(Vni start,
Vni end)
Reserves a range of VNIs, from a start point to an end point,
inclusively.
|
void |
unreserve(Vni vni)
Unreserves (or frees up) a VNI.
|
void |
unreserve(VniRange range)
Unreserves (or frees up) a range of VNIs.
|
Vni reserve() throws VniReservationException
VniReservationException
- if there are no available VNIs to
reserveVniRange reserve(Vni start, Vni end) throws VniReservationException
start
- the starting VNI of the range to reserveend
- the ending VNI of the range to reserveVniReservationException
- if any part of the requested range has
already been reservedIllegalArgumentException
- if the start VNI is greater than the end
VNIvoid unreserve(Vni vni)
reserve()
, when unreserving a VNI that has not
previously been allocated, no checked exception is thrown. That is, it
doesn't matter if the VNI requested for unreservation is currently
reserved or not, we just make sure the end result is that it is
unreserved.vni
- the VNI to un-reservevoid unreserve(VniRange range)
reserve(Vni, Vni)
, when unreserving a range of
VNIs that have not previously been allocated, no checked exception is
thrown. That is, it doesn't matter if the range of VNIs requested for
unreservation is currently reserved or not, we just make sure the end
result is that they are all unreserved.range
- the range of VNIs to un-reserveCopyright © 2016. All Rights Reserved.