Copyright (C) 2012 Ness Computing, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Create a default thread pool.
Create a thread pool for long-running tasks. The default settings will change to not have a
Create a thread pool for short-running tasks. The default settings will change to have one thread
available per core, plus a few to pick up slack.
Set the default pool core thread count.
Set the default worker thread idle timeout.
Set the default rejected execution handler.
Add a CallableWrapper that may decorate this executor service.
Remove thread delegated wrapper.
return "com.nesscomputing.concurrent:type=ThreadPool,name=" + threadPoolName;
Preconditions.checkState(myService != null, "Thread pool %s was injected before lifecycle start or after lifecycle stop. " +
"You might consider injecting a Provider instead, or maybe you forgot a Lifecycle entirely.", threadPoolName);
Preconditions.checkState(myService != null, "no service was ever started?");