public class MaskedIPSet extends HashSet<String>
Provides IP address masking functionality to detect routers with matching IP addresses or belonging to the same network family. Used for network topology analysis and peer relationship identification in distributed hash table operations.
Supports configurable masking levels (1-4 bytes) and includes both communication system records and network database addresses for comprehensive matching. Optimized for efficiency with local lookup operations to avoid deadlocks.
As of 0.9.24, returned set includes netdb family as well as IP-based matches for broader detection capabilities.
| Constructor and Description |
|---|
MaskedIPSet() |
MaskedIPSet(int initialCapacity) |
MaskedIPSet(RouterContext ctx,
Hash peer,
int mask)
The Set of IPs for this peer, with a given mask.
|
MaskedIPSet(RouterContext ctx,
Hash peer,
RouterInfo pinfo,
int mask)
The Set of IPs for this peer, with a given mask.
|
MaskedIPSet(RouterContext ctx,
RouterInfo pinfo,
int mask)
The Set of IPs for this peer, with a given mask.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsAny(Set<String> b)
does this contain any of the elements in b?
|
add, clear, clone, contains, isEmpty, iterator, remove, size, spliteratorequals, hashCode, removeAlladdAll, containsAll, retainAll, toArray, toArray, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitaddAll, containsAll, equals, hashCode, removeAll, retainAll, toArray, toArrayparallelStream, removeIf, streampublic MaskedIPSet()
public MaskedIPSet(int initialCapacity)
public MaskedIPSet(RouterContext ctx, Hash peer, int mask)
peer - non-nullmask - is 1-4 (number of bytes to match)public MaskedIPSet(RouterContext ctx, Hash peer, RouterInfo pinfo, int mask)
pinfo - may be nullmask - is 1-4 (number of bytes to match)public MaskedIPSet(RouterContext ctx, RouterInfo pinfo, int mask)
pinfo - may be nullmask - is 1-4 (number of bytes to match)