public abstract static class HandoffExecutorResolver.AbstractThreadFactoryResolver extends Object implements HandoffExecutorResolver
ThreadFactoryResolver implementations that handles the case of a null
threadFactoryName by installing a ThreadFactoryService whose service name is
the service name of the thread pool with thread-factory appended.HandoffExecutorResolver.AbstractThreadFactoryResolver, HandoffExecutorResolver.SimpleResolverSTANDARD_RESOLVER| Constructor and Description |
|---|
AbstractThreadFactoryResolver() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
releaseDefaultHandoffExecutor(org.jboss.msc.service.ServiceName threadPoolServiceName,
OperationContext context)
Removes any default thread factory installed in
resolveDefaultHandoffExecutor(String, org.jboss.msc.service.ServiceName, org.jboss.msc.service.ServiceTarget). |
void |
releaseHandoffExecutor(String handoffExecutorName,
String threadPoolName,
org.jboss.msc.service.ServiceName threadPoolServiceName,
OperationContext context)
Releases the handoff executor, doing any necessary cleanup, such as removing a default executor that
was installed by
HandoffExecutorResolver.resolveHandoffExecutor(String, String, org.jboss.msc.service.ServiceName, org.jboss.msc.service.ServiceTarget). |
protected void |
releaseNamedHandoffExecutor(String handoffExecutorName,
String threadPoolName,
org.jboss.msc.service.ServiceName threadPoolServiceName,
OperationContext context)
Handles the work of
releaseHandoffExecutor(String, String, ServiceName, OperationContext) for the case
where threadFactoryName is not null. |
protected org.jboss.msc.service.ServiceName |
resolveDefaultHandoffExecutor(String threadPoolName,
org.jboss.msc.service.ServiceName threadPoolServiceName,
org.jboss.msc.service.ServiceTarget serviceTarget)
Optionally provides the service name of a default handoff executor.
|
org.jboss.msc.service.ServiceName |
resolveHandoffExecutor(String handoffExecutorName,
String threadPoolName,
org.jboss.msc.service.ServiceName threadPoolServiceName,
org.jboss.msc.service.ServiceTarget serviceTarget)
Resolves the service name of the handoff executor a thread pool service should use, optionally providing a default
executor in case the thread pool does not have a specifically configured handoff executor.
|
protected abstract org.jboss.msc.service.ServiceName |
resolveNamedHandoffExecutor(String handoffExecutorName,
String threadPoolName,
org.jboss.msc.service.ServiceName threadPoolServiceName)
Create a service name to use for the thread factory in the case where a simple name for the factory was provided.
|
public org.jboss.msc.service.ServiceName resolveHandoffExecutor(String handoffExecutorName, String threadPoolName, org.jboss.msc.service.ServiceName threadPoolServiceName, org.jboss.msc.service.ServiceTarget serviceTarget)
HandoffExecutorResolverresolveHandoffExecutor in interface HandoffExecutorResolverhandoffExecutorName - the simple name of the handoff executor. Typically a reference value from
the thread pool resource's configuration. Can be null in which case a
default handoff executor may be returned.threadPoolName - the name of the thread poolthreadPoolServiceName - the full name of the Service that provides the thread poolserviceTarget - service target that is installing the thread pool service; can be used to install
a ThreadFactoryServiceServiceName of the executor service the thread pool should use. May be nullpublic void releaseHandoffExecutor(String handoffExecutorName, String threadPoolName, org.jboss.msc.service.ServiceName threadPoolServiceName, OperationContext context)
HandoffExecutorResolverHandoffExecutorResolver.resolveHandoffExecutor(String, String, org.jboss.msc.service.ServiceName, org.jboss.msc.service.ServiceTarget).releaseHandoffExecutor in interface HandoffExecutorResolverhandoffExecutorName - the simple name of the thread factory. Typically a reference value from
the thread pool resource's configuration. Can be null in which case a
default thread factory should be released.threadPoolName - the name of the thread poolthreadPoolServiceName - the full name of the Service that provides the thread poolcontext - the context of the current operation; can be used to perform any necessary
service removalsprotected abstract org.jboss.msc.service.ServiceName resolveNamedHandoffExecutor(String handoffExecutorName, String threadPoolName, org.jboss.msc.service.ServiceName threadPoolServiceName)
handoffExecutorName - the simple name of the thread factory. Will not be nullthreadPoolName - the simple name of the related thread poolthreadPoolServiceName - the full service name of the thread poolServiceName of the ThreadFactoryService the thread pool should use. Cannot be
nullprotected void releaseNamedHandoffExecutor(String handoffExecutorName, String threadPoolName, org.jboss.msc.service.ServiceName threadPoolServiceName, OperationContext context)
releaseHandoffExecutor(String, String, ServiceName, OperationContext) for the case
where threadFactoryName is not null. This default implementation does nothing, assuming
the thread factory is independently managed from the pool.handoffExecutorName - the simple name of the thread factory. Will not be nullthreadPoolName - the simple name of the related thread poolthreadPoolServiceName - the full service name of the thread poolcontext - the context of the current operation; can be used to perform any necessary
service removalsprotected org.jboss.msc.service.ServiceName resolveDefaultHandoffExecutor(String threadPoolName, org.jboss.msc.service.ServiceName threadPoolServiceName, org.jboss.msc.service.ServiceTarget serviceTarget)
null, meaning there is no default.threadPoolName - the name of the thread poolthreadPoolServiceName - the full name of the Service that provides the thread poolserviceTarget - service target that is installing the thread pool service; can be used to install
a ThreadFactoryServiceServiceName of the ThreadFactoryService the thread pool should use. May be nullprotected void releaseDefaultHandoffExecutor(org.jboss.msc.service.ServiceName threadPoolServiceName,
OperationContext context)
resolveDefaultHandoffExecutor(String, org.jboss.msc.service.ServiceName, org.jboss.msc.service.ServiceTarget).
This default implementation does nothing, but any subclass that installs a default service should override this
method to remove it.threadPoolServiceName - the full name of the Service that provides the thread poolcontext - the context of the current operation; can be used to perform any necessary
service removalsCopyright © 2019 JBoss by Red Hat. All rights reserved.