public class WorkManagerImpl extends java.lang.Object implements WorkManager
Constructor and Description |
---|
WorkManagerImpl()
Constructor - by default the WorkManager is running in spec-compliant mode
|
Modifier and Type | Method and Description |
---|---|
boolean |
cancelShutdown()
Cancel shutdown
|
WorkManager |
clone()
Clone the WorkManager implementation
|
protected void |
deltaDoWorkAccepted()
Delta doWork accepted
|
protected void |
deltaDoWorkRejected()
Delta doWork rejected
|
protected void |
deltaScheduleWorkAccepted()
Delta scheduleWork accepted
|
protected void |
deltaScheduleWorkRejected()
Delta scheduleWork rejected
|
protected void |
deltaStartWorkAccepted()
Delta startWork accepted
|
protected void |
deltaStartWorkRejected()
Delta startWork rejected
|
protected void |
deltaWorkFailed()
Delta work failed
|
protected void |
deltaWorkSuccessful()
Delta work successful
|
void |
doFirstChecks(javax.resource.spi.work.Work work,
long startTimeout,
javax.resource.spi.work.ExecutionContext execContext)
Do first checks for work starting methods
|
void |
doWork(javax.resource.spi.work.Work work) |
void |
doWork(javax.resource.spi.work.Work work,
long startTimeout,
javax.resource.spi.work.ExecutionContext execContext,
javax.resource.spi.work.WorkListener workListener) |
Callback |
getCallbackSecurity()
Get the callback security module
|
java.lang.String |
getId()
Get the unique id of the work manager
|
StatisticsExecutor |
getLongRunningThreadPool()
Retrieve the executor for long running tasks
|
java.lang.String |
getName()
Get the name of the work manager
|
javax.resource.spi.ResourceAdapter |
getResourceAdapter()
Get the resource adapter
|
StatisticsExecutor |
getShortRunningThreadPool()
Retrieve the executor for short running tasks
|
WorkManagerStatistics |
getStatistics()
Get the statistics
|
XATerminator |
getXATerminator()
Get the XATerminator
|
boolean |
isShutdown()
Is the component shutdown
|
boolean |
isSpecCompliant()
Is spec compliant
|
boolean |
isStatisticsEnabled()
Is statistics enabled
|
void |
prepareShutdown()
Signal the component to prepare for shutdown
|
void |
scheduleWork(javax.resource.spi.work.Work work) |
void |
scheduleWork(javax.resource.spi.work.Work work,
long startTimeout,
javax.resource.spi.work.ExecutionContext execContext,
javax.resource.spi.work.WorkListener workListener) |
void |
setCallbackSecurity(Callback v)
Set callback security module
|
void |
setId(java.lang.String v)
Set the unique id of the work manager
|
void |
setLongRunningThreadPool(org.jboss.threads.BlockingExecutor executor)
Set the executor for long running tasks
|
void |
setName(java.lang.String v)
Set the name of the work manager
|
void |
setResourceAdapter(javax.resource.spi.ResourceAdapter v)
Set the resource adapter
|
void |
setShortRunningThreadPool(org.jboss.threads.BlockingExecutor executor)
Set the executor for short running tasks
|
void |
setSpecCompliant(boolean v)
Set spec compliant flag
|
void |
setStatisticsEnabled(boolean v)
Set the statistics enabled flag
|
void |
setXATerminator(XATerminator xaTerminator)
Set the XATerminator
|
void |
shutdown()
Shutdown the component
|
long |
startWork(javax.resource.spi.work.Work work) |
long |
startWork(javax.resource.spi.work.Work work,
long startTimeout,
javax.resource.spi.work.ExecutionContext execContext,
javax.resource.spi.work.WorkListener workListener) |
java.lang.String |
toString()
String representation
|
void |
toString(java.lang.StringBuilder sb)
Additional string representation
|
public WorkManagerImpl()
public java.lang.String getId()
public void setId(java.lang.String v)
v
- The valuepublic java.lang.String getName()
public void setName(java.lang.String v)
v
- The valuepublic StatisticsExecutor getShortRunningThreadPool()
public void setShortRunningThreadPool(org.jboss.threads.BlockingExecutor executor)
executor
- The executorpublic StatisticsExecutor getLongRunningThreadPool()
public void setLongRunningThreadPool(org.jboss.threads.BlockingExecutor executor)
executor
- The executorpublic XATerminator getXATerminator()
public void setXATerminator(XATerminator xaTerminator)
xaTerminator
- The XA terminatorpublic boolean isSpecCompliant()
public void setSpecCompliant(boolean v)
v
- The valuepublic Callback getCallbackSecurity()
public void setCallbackSecurity(Callback v)
v
- The valuepublic javax.resource.spi.ResourceAdapter getResourceAdapter()
public void setResourceAdapter(javax.resource.spi.ResourceAdapter v)
v
- The valuepublic boolean isStatisticsEnabled()
public void setStatisticsEnabled(boolean v)
v
- The valuepublic WorkManagerStatistics getStatistics()
public WorkManager clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
- Thrown if the copy operation isn't supportedpublic void doWork(javax.resource.spi.work.Work work) throws javax.resource.spi.work.WorkException
doWork
in interface javax.resource.spi.work.WorkManager
javax.resource.spi.work.WorkException
public void doWork(javax.resource.spi.work.Work work, long startTimeout, javax.resource.spi.work.ExecutionContext execContext, javax.resource.spi.work.WorkListener workListener) throws javax.resource.spi.work.WorkException
doWork
in interface javax.resource.spi.work.WorkManager
javax.resource.spi.work.WorkException
public long startWork(javax.resource.spi.work.Work work) throws javax.resource.spi.work.WorkException
startWork
in interface javax.resource.spi.work.WorkManager
javax.resource.spi.work.WorkException
public long startWork(javax.resource.spi.work.Work work, long startTimeout, javax.resource.spi.work.ExecutionContext execContext, javax.resource.spi.work.WorkListener workListener) throws javax.resource.spi.work.WorkException
startWork
in interface javax.resource.spi.work.WorkManager
javax.resource.spi.work.WorkException
public void scheduleWork(javax.resource.spi.work.Work work) throws javax.resource.spi.work.WorkException
scheduleWork
in interface javax.resource.spi.work.WorkManager
javax.resource.spi.work.WorkException
public void scheduleWork(javax.resource.spi.work.Work work, long startTimeout, javax.resource.spi.work.ExecutionContext execContext, javax.resource.spi.work.WorkListener workListener) throws javax.resource.spi.work.WorkException
scheduleWork
in interface javax.resource.spi.work.WorkManager
javax.resource.spi.work.WorkException
protected void deltaDoWorkAccepted()
protected void deltaDoWorkRejected()
protected void deltaStartWorkAccepted()
protected void deltaStartWorkRejected()
protected void deltaScheduleWorkAccepted()
protected void deltaScheduleWorkRejected()
protected void deltaWorkSuccessful()
protected void deltaWorkFailed()
public void doFirstChecks(javax.resource.spi.work.Work work, long startTimeout, javax.resource.spi.work.ExecutionContext execContext) throws javax.resource.spi.work.WorkException
work
- to checkstartTimeout
- to checkexecContext
- to checkjavax.resource.spi.work.WorkException
- in case of check don't passpublic boolean cancelShutdown()
cancelShutdown
in interface GracefulShutdown
public void prepareShutdown()
prepareShutdown
in interface GracefulShutdown
public void shutdown()
shutdown
in interface GracefulShutdown
public boolean isShutdown()
isShutdown
in interface GracefulShutdown
public java.lang.String toString()
toString
in class java.lang.Object
public void toString(java.lang.StringBuilder sb)
sb
- The string builderCopyright © 2013 IronJacamar (http://www.ironjacamar.org)