Package org.jboss.as.threads
Interface HandoffExecutorResolver
- All Known Implementing Classes:
HandoffExecutorResolver.AbstractThreadFactoryResolver,HandoffExecutorResolver.SimpleResolver
public interface HandoffExecutorResolver
Resolves the service name of the executor service a thread pool service should use if it cannot itself accept
a task. Optionally provides an executor service for the thread pool to use in case the thread pool does not have a
specifically configured handoff executor. The absence of a specifically configured thread pool would be typical.
- Author:
- Brian Stansberry (c) 2011 Red Hat Inc.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classBase class forThreadFactoryResolverimplementations that handles the case of a nullthreadFactoryNameby installing aThreadFactoryServicewhose service name is the service name of the thread pool withthread-factoryappended.static classExtendsHandoffExecutorResolver.AbstractThreadFactoryResolverto deal with named thread factories by appending their simple name to a provided base name. -
Method Summary
Modifier and TypeMethodDescriptionvoidreleaseHandoffExecutor(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 byresolveHandoffExecutor(String, String, org.jboss.msc.service.ServiceName, org.jboss.msc.service.ServiceTarget).org.jboss.msc.service.ServiceNameresolveHandoffExecutor(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.
-
Method Details
-
resolveHandoffExecutor
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.- Parameters:
handoffExecutorName- the simple name of the handoff executor. Typically a reference value from the thread pool resource's configuration. Can benullin which case a default handoff executor may be returned.threadPoolName- the name of the thread poolthreadPoolServiceName- the full name of theServicethat provides the thread poolserviceTarget- service target that is installing the thread pool service; can be used to install aThreadFactoryService- Returns:
- the
ServiceNameof the executor service the thread pool should use. May be {@link null}
-
releaseHandoffExecutor
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 byresolveHandoffExecutor(String, String, org.jboss.msc.service.ServiceName, org.jboss.msc.service.ServiceTarget).- Parameters:
handoffExecutorName- the simple name of the thread factory. Typically a reference value from the thread pool resource's configuration. Can benullin which case a default thread factory should be released.threadPoolName- the name of the thread poolthreadPoolServiceName- the full name of theServicethat provides the thread poolcontext- the context of the current operation; can be used to perform any necessaryservice removals
-