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