Package com.hazelcast.config
Interface ConfigPatternMatcher
-
- All Known Implementing Classes:
MatchingPointConfigPatternMatcher
,RegexConfigPatternMatcher
,WildcardConfigPatternMatcher
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface ConfigPatternMatcher
The ConfigPatternMatcher provides a strategy to match an item name to a configuration pattern.It is used on each Config.getXXXConfig() and ClientConfig.getXXXConfig() call for any data structure. It is supplied a list of config patterns and the name of the item that the configuration is requested for.
Default matcher is
MatchingPointConfigPatternMatcher
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
matches(java.lang.Iterable<java.lang.String> configPatterns, java.lang.String itemName)
Returns the best match for an item name out of a list of configuration patterns.
-
-
-
Method Detail
-
matches
java.lang.String matches(java.lang.Iterable<java.lang.String> configPatterns, java.lang.String itemName) throws InvalidConfigurationException
Returns the best match for an item name out of a list of configuration patterns.- Parameters:
configPatterns
- list of known configuration patternsitemName
- item name to match- Returns:
- a key of configPatterns which matches
the item name or
null
if there is no match - Throws:
InvalidConfigurationException
- if ambiguous configurations are found
-
-