Package alluxio.conf.path
Class PrefixPathMatcher
- java.lang.Object
-
- alluxio.conf.path.PrefixPathMatcher
-
- All Implemented Interfaces:
PathMatcher
@ThreadSafe public final class PrefixPathMatcher extends java.lang.Object implements PathMatcher
APathMatcher
to match a path against a set of paths. Path a matches path b if a is the same as b or a is in the subtree of b. For example: /a/b/c matches /a/b, but /a/bc does not match /a/b because although /a/b is a prefix of /a/bc, /a/bc is not in the subtree of /a/b.
-
-
Constructor Summary
Constructors Constructor Description PrefixPathMatcher(java.util.Set<java.lang.String> paths)
Builds internal trie based on paths.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Optional<java.util.List<java.lang.String>>
match(AlluxioURI path)
-
-
-
Method Detail
-
match
public java.util.Optional<java.util.List<java.lang.String>> match(AlluxioURI path)
- Specified by:
match
in interfacePathMatcher
- Parameters:
path
- the path to be matched, must start with "/"- Returns:
- the list of matched path patterns sorted by descending match preferences
-
-