|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.sling.commons.threads.impl.DefaultThreadPoolManager
public class DefaultThreadPoolManager
The DefaultThreadPoolManager implements the ThreadPoolManager
interface
and is responsible for managing ThreadPool
s.
Nested Class Summary | |
---|---|
protected static class |
DefaultThreadPoolManager.Entry
|
Field Summary | |
---|---|
protected org.osgi.framework.BundleContext |
bundleContext
The bundle context. |
protected org.slf4j.Logger |
logger
By default we use the logger for this class. |
protected Map<String,DefaultThreadPoolManager.Entry> |
pools
The managed thread pools |
protected Dictionary<String,Object> |
properties
The properties. |
Fields inherited from interface org.apache.sling.commons.threads.ThreadPoolManager |
---|
DEFAULT_THREADPOOL_NAME |
Constructor Summary | |
---|---|
DefaultThreadPoolManager(org.osgi.framework.BundleContext bc,
Dictionary<String,Object> props)
Constructor and activate this component. |
Method Summary | |
---|---|
ThreadPool |
create(ThreadPoolConfig config)
Create a new thread pool with this configuration. |
ThreadPool |
create(ThreadPoolConfig config,
String label)
Create a new thread pool with this configuration. |
void |
deleted(String pid)
|
void |
destroy()
Deactivate this component. |
ThreadPool |
get(String name)
Get a thread pool. |
DefaultThreadPoolManager.Entry[] |
getConfigurations()
Return all configurations for the web console printer |
String |
getName()
|
void |
release(ThreadPool pool)
Release the thread pool again. |
void |
updated(String pid,
Dictionary properties)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final org.slf4j.Logger logger
protected final Map<String,DefaultThreadPoolManager.Entry> pools
protected final Dictionary<String,Object> properties
protected final org.osgi.framework.BundleContext bundleContext
Constructor Detail |
---|
public DefaultThreadPoolManager(org.osgi.framework.BundleContext bc, Dictionary<String,Object> props)
Method Detail |
---|
public void destroy()
public ThreadPool get(String name)
ThreadPoolManager
ThreadPoolManager.release(ThreadPool)
method.
get
in interface ThreadPoolManager
name
- The name of the thread pool or null for the default pool.
ThreadPoolManager.get(java.lang.String)
public void release(ThreadPool pool)
ThreadPoolManager
release
in interface ThreadPoolManager
ThreadPoolManager.release(org.apache.sling.commons.threads.ThreadPool)
public ThreadPool create(ThreadPoolConfig config)
ThreadPoolManager
ThreadPoolManager.release(ThreadPool)
method.
create
in interface ThreadPoolManager
config
- The thread pool configuration.
ThreadPoolManager.create(org.apache.sling.commons.threads.ThreadPoolConfig)
public ThreadPool create(ThreadPoolConfig config, String label)
ThreadPoolManager
ThreadPoolManager.release(ThreadPool)
method.
create
in interface ThreadPoolManager
config
- The thread pool configuration.label
- An optional label for the thread pool. The label
will be appended to the name of the pool.
public String getName()
getName
in interface org.osgi.service.cm.ManagedServiceFactory
ManagedServiceFactory.getName()
public DefaultThreadPoolManager.Entry[] getConfigurations()
public void updated(String pid, Dictionary properties) throws org.osgi.service.cm.ConfigurationException
updated
in interface org.osgi.service.cm.ManagedServiceFactory
org.osgi.service.cm.ConfigurationException
ManagedServiceFactory.updated(java.lang.String, java.util.Dictionary)
public void deleted(String pid)
deleted
in interface org.osgi.service.cm.ManagedServiceFactory
ManagedServiceFactory.deleted(java.lang.String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |