com.hazelcast.config.matcher
Class WildcardConfigPatternMatcher
java.lang.Object
com.hazelcast.config.matcher.WildcardConfigPatternMatcher
- All Implemented Interfaces:
- ConfigPatternMatcher
public class WildcardConfigPatternMatcher
- extends Object
- implements ConfigPatternMatcher
This ConfigPatternMatcher
supports a simplified wildcard matching.
See "Config.md ## Using Wildcard" for details about the syntax options.
Throws ConfigurationException
is multiple configurations are found.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WildcardConfigPatternMatcher
public WildcardConfigPatternMatcher()
matches
public String matches(Iterable<String> configPatterns,
String itemName)
throws ConfigurationException
- Description copied from interface:
ConfigPatternMatcher
- Returns the best match for an item name out of a list of configuration patterns.
- Specified by:
matches
in interface ConfigPatternMatcher
- Parameters:
configPatterns
- list of configuration patternsitemName
- item name to match
- Returns:
- a key of configPatterns which matches the item name or null if nothing matches
- Throws:
ConfigurationException
- if ambiguous configurations are found
matches
public boolean matches(String pattern,
String itemName)
- This method is public to be accessible by
InstancePermission
.
- Parameters:
pattern
- configuration pattern to match withitemName
- item name to match
- Returns:
- true if itemName matches, false otherwise
Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.