in src/main/java/org/apache/sling/distribution/queue/impl/PriorityQueueDispatchingStrategy.java [71:104]
public Map<String, String> getMatchingQueues(String[] paths) {
Map<String, String> result = new TreeMap<String, String>();
if (paths == null) {
paths = new String[] { null };
}
for (String queueSelector : selectors.keySet()) {
String pathMatcher = selectors.get(queueSelector);
int idx = queueSelector.indexOf('|');
String queuePrefix = queueSelector;
String queueMatcher = null;
if (idx >=0) {
queuePrefix = queueSelector.substring(0, idx);
queueMatcher = queueSelector.substring(idx+1);
}
for (String path : paths) {
if (path == null || path.matches(pathMatcher)) {
for (String mainQueue : mainQueues) {
if (queueMatcher == null || mainQueue.matches(queueMatcher)) {
result.put(queuePrefix + "-" + mainQueue, mainQueue);
}
}
}
}
}
return result;
}