|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.googlecode.ipv6.IPv6AddressPool
public final class IPv6AddressPool
Immutable representation of an IPv6 address pool.
An IPv6 address pool is like an IPv6 address range in which some addresses are "free" and some are "allocated". Think "dhcp server". Addresses are allocated in whole subnet blocks at once. These subnet blocks have a predefined prefix length for the whole allocatable range.
Method Summary | |
---|---|
IPv6AddressPool |
allocate()
Allocate the first available subnet from the pool. |
IPv6AddressPool |
allocate(IPv6Network toAllocate)
Allocate the given subnet from the pool. |
boolean |
contains(IPv6Address address)
|
boolean |
contains(IPv6AddressRange range)
|
IPv6AddressPool |
deAllocate(IPv6Network toDeAllocate)
Give a network back to the pool (de-allocate). |
boolean |
equals(Object o)
|
Iterable<IPv6Network> |
freeNetworks()
|
static IPv6AddressPool |
fromRangeAndSubnet(IPv6AddressRange range,
IPv6NetworkMask allocationSubnetSize)
Create a pool of the given range (boundaries inclusive) which is completely free. |
IPv6Address |
getFirst()
|
IPv6Address |
getLast()
|
IPv6Network |
getLastAllocated()
|
int |
hashCode()
|
boolean |
isExhausted()
|
boolean |
isFree(IPv6Network network)
|
boolean |
overlaps(IPv6AddressRange range)
|
String |
toLongString()
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public static IPv6AddressPool fromRangeAndSubnet(IPv6AddressRange range, IPv6NetworkMask allocationSubnetSize)
range
- range from within to allocateallocationSubnetSize
- size of the subnets that will be allocatedpublic IPv6Network getLastAllocated()
public IPv6AddressPool allocate()
public IPv6AddressPool allocate(IPv6Network toAllocate)
toAllocate
- subnet to allocate from the pool
public IPv6AddressPool deAllocate(IPv6Network toDeAllocate)
toDeAllocate
- network to de-allocatepublic boolean isExhausted()
public boolean isFree(IPv6Network network)
public Iterable<IPv6Network> freeNetworks()
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public boolean contains(IPv6Address address)
public boolean contains(IPv6AddressRange range)
public boolean overlaps(IPv6AddressRange range)
public IPv6Address getFirst()
public IPv6Address getLast()
public String toString()
toString
in class Object
public String toLongString()
toString
but without using shorthand notations for addresses
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |