protected boolean add(Entry entry) { if (_entries.containsKey(entry.getPattern())) return false; _entries.put(entry.getPattern(),entry); if (entry instanceof LocationEntry || entry instanceof ModuleEntry) { if (entry.isInclusive()) _locations.include(entry); else _locations.exclude(entry); } else { if (entry.isInclusive()) _patterns.include(entry); else _patterns.exclude(entry); } return true; }
/** * Add an include PathMatcher * * @param matcher * the path matcher for this include */ public void addInclude(PathMatcher matcher) { includeExclude.include(matcher); }
public Config(Path path, Config parent) { this.parent = parent; this.includeExclude = parent==null ? new IncludeExcludeSet<>(PathMatcherSet.class) : parent.includeExclude; Path dir = path; if (!Files.exists(path)) throw new IllegalStateException("Path does not exist: "+path); if (!Files.isDirectory(path)) { dir = path.getParent(); includeExclude.include(new ExactPathMatcher(path)); setRecurseDepth(0); } this.path = dir; }
/** * Include a InetAddress pattern * @see InetAddressSet * @param pattern InetAddress pattern to exclude */ public void include(String pattern) { _set.include(pattern); }
/** * Include a InetAddress pattern * @see InetAddressSet * @param patterns InetAddress patterns to exclude */ public void include(String... patterns) { _set.include(patterns); }
/** * Includes an InetAddress pattern * * @param pattern InetAddress pattern to include * @see InetAddressSet */ public void include(String pattern) { _set.include(pattern); }
/** * Includes InetAddress patterns * * @param patterns InetAddress patterns to include * @see InetAddressSet */ public void include(String... patterns) { _set.include(patterns); }
/** * Add an include PathMatcher * * @param matcher * the path matcher for this include */ public void addInclude(PathMatcher matcher) { includeExclude.include(matcher); }
@ManagedOperation("Include IP in thread limits") public void include(String inetAddressPattern) { _includeExcludeSet.include(inetAddressPattern); }
public Config(Path path, Config parent) { this.parent = parent; this.includeExclude = parent==null ? new IncludeExcludeSet<>(PathMatcherSet.class) : parent.includeExclude; Path dir = path; if (!Files.exists(path)) throw new IllegalStateException("Path does not exist: "+path); if (!Files.isDirectory(path)) { dir = path.getParent(); includeExclude.include(new ExactPathMatcher(path)); setRecurseDepth(0); } this.path = dir; }
protected boolean add(Entry entry) { if (_entries.containsKey(entry.getPattern())) return false; _entries.put(entry.getPattern(),entry); if (entry instanceof LocationEntry || entry instanceof ModuleEntry) { if (entry.isInclusive()) _locations.include(entry); else _locations.exclude(entry); } else { if (entry.isInclusive()) _patterns.include(entry); else _patterns.exclude(entry); } return true; }