public class NetworkOrganizer
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
NetworkOrganizer.VirtualNode |
static class |
NetworkOrganizer.VirtualTree |
Modifier and Type | Field and Description |
---|---|
protected java.util.List<NetworkInformation> |
informationCollection |
protected java.lang.String |
networkMask |
protected NetworkOrganizer.VirtualTree |
tree |
Constructor and Description |
---|
NetworkOrganizer(java.util.Collection<NetworkInformation> infoSet)
This constructor is NOT implemented yet
|
NetworkOrganizer(java.util.Collection<NetworkInformation> infoSet,
java.lang.String mask) |
Modifier and Type | Method and Description |
---|---|
protected static java.lang.String |
convertIpToOctets(java.lang.String ip) |
protected java.util.List<java.lang.String> |
getIntersections(int numShards,
java.util.Collection<java.lang.String> primary)
This method returns specified numbers of IP's by parsing original list of trees into some form of binary tree
|
java.util.List<java.lang.String> |
getSubset(int numShards)
This method returns specified number of IP addresses from original list of addresses
|
java.util.List<java.lang.String> |
getSubset(int numShards,
java.util.Collection<java.lang.String> primary)
This method returns specified number of IP addresses from original list of addresses, that are NOT listen in primary collection
|
protected static java.lang.String |
toBinaryOctet(java.lang.Integer value) |
protected static java.lang.String |
toBinaryOctet(java.lang.String value) |
protected java.util.List<NetworkInformation> informationCollection
protected java.lang.String networkMask
protected NetworkOrganizer.VirtualTree tree
public NetworkOrganizer(@NonNull java.util.Collection<NetworkInformation> infoSet)
infoSet
- public NetworkOrganizer(@NonNull java.util.Collection<NetworkInformation> infoSet, java.lang.String mask)
public java.util.List<java.lang.String> getSubset(int numShards)
numShards
- public java.util.List<java.lang.String> getSubset(int numShards, java.util.Collection<java.lang.String> primary)
numShards
- primary
- Collection of IP addresses that shouldn't be in resultprotected static java.lang.String convertIpToOctets(@NonNull java.lang.String ip)
protected static java.lang.String toBinaryOctet(@NonNull java.lang.Integer value)
protected static java.lang.String toBinaryOctet(@NonNull java.lang.String value)
protected java.util.List<java.lang.String> getIntersections(int numShards, java.util.Collection<java.lang.String> primary)
numShards
- primary
-