You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by cz...@apache.org on 2016/07/18 07:24:47 UTC
svn commit: r1753165 -
/sling/trunk/bundles/commons/scheduler/src/main/java/org/apache/sling/commons/scheduler/impl/QuartzScheduler.java
Author: cziegeler
Date: Mon Jul 18 07:24:47 2016
New Revision: 1753165
URL: http://svn.apache.org/viewvc?rev=1753165&view=rev
Log:
SLING-5831 : Support different thread pools for scheduled tasks
Modified:
sling/trunk/bundles/commons/scheduler/src/main/java/org/apache/sling/commons/scheduler/impl/QuartzScheduler.java
Modified: sling/trunk/bundles/commons/scheduler/src/main/java/org/apache/sling/commons/scheduler/impl/QuartzScheduler.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/commons/scheduler/src/main/java/org/apache/sling/commons/scheduler/impl/QuartzScheduler.java?rev=1753165&r1=1753164&r2=1753165&view=diff
==============================================================================
--- sling/trunk/bundles/commons/scheduler/src/main/java/org/apache/sling/commons/scheduler/impl/QuartzScheduler.java (original)
+++ sling/trunk/bundles/commons/scheduler/src/main/java/org/apache/sling/commons/scheduler/impl/QuartzScheduler.java Mon Jul 18 07:24:47 2016
@@ -165,15 +165,23 @@ public class QuartzScheduler implements
}
}
+ /**
+ * Get the thread pool name to use based on the provided/configured name
+ * @param name The configured name
+ * @return The name to use
+ */
private String getThreadPoolName(final String name) {
+ // no name specified
if ( name == null || name.trim().isEmpty() ) {
return this.defaultPoolName;
}
+ // checked allowed list
for(final String n : this.allowedPoolNames) {
if ( name.trim().equals(n) ) {
return n;
}
}
+ logger.warn("Scheduler job requested thread pool with name " + name + " but this thread pool is not in the list of allowed pools.");
return this.defaultPoolName;
}