Package org.apache.cassandra.auth
Interface CIDRGroupsMappingTable<V>
-
- All Known Implementing Classes:
CIDRGroupsMappingIntervalTree
public interface CIDRGroupsMappingTable<V>
This interface defines functionality to be provided by algorithm(s) implementing CIDR to CIDR groups mappings, to facilitate the efficient way to find the longest matching CIDR for a given IP
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
CIDRGroupsMappingTable.Builder<V>
Builder to add CIDR to CIDR groups mappings and construct a mapping table with them
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static <V> CIDRGroupsMappingTable.Builder<V>
builder(boolean isIPv6)
default java.lang.String
getIPTypeString(boolean isIPv6)
java.util.Set<V>
lookupLongestMatchForIP(java.net.InetAddress ip)
Finds the longest matching CIDR for the given IP
-
-
-
Method Detail
-
getIPTypeString
default java.lang.String getIPTypeString(boolean isIPv6)
-
builder
static <V> CIDRGroupsMappingTable.Builder<V> builder(boolean isIPv6)
-
lookupLongestMatchForIP
java.util.Set<V> lookupLongestMatchForIP(java.net.InetAddress ip)
Finds the longest matching CIDR for the given IP- Parameters:
ip
- IP to lookup CIDR group- Returns:
- returns CIDR group(s) associated with the longest matching CIDR for the given IP, returns null if no match found
-
-