protected class WorkManager.RemoteWorkManager extends Base implements commonj.work.WorkManager
Base.LoggingWriter, Base.StackFrame
Modifier and Type | Field and Description |
---|---|
protected Member |
m_memberPinned
The service Member this RemoteWorkManager is pinned to.
|
Constructor and Description |
---|
RemoteWorkManager(Member memberPinned) |
Modifier and Type | Method and Description |
---|---|
commonj.work.WorkItem |
schedule(commonj.work.Work work)
Dispatches a Work asynchronously.
|
commonj.work.WorkItem |
schedule(commonj.work.Work work, commonj.work.WorkListener workListener)
Dispatches a Work asynchronously.
|
protected commonj.work.WorkItem |
schedule(commonj.work.Work work, commonj.work.WorkListener workListener, Member member)
Accepts a Work instance for processing at the specified Member.
|
boolean |
waitForAll(Collection collWorkItems, long lTimeoutMillis)
Wait for all WorkItems in the collection to finish successfully or otherwise.
|
Collection |
waitForAny(Collection collWorkItems, long lTimeoutMillis)
Wait for any of the WorkItems in the collection to finish.
|
azzert, azzert, azzert, azzertFailed, breakLines, breakLines, capitalize, checkNotEmpty, checkNotNull, checkRange, computeSafeWaitTime, decimalValue, dup, dup, ensureBigDecimal, ensureClassLoader, ensureRuntimeException, ensureRuntimeException, equals, equalsDeep, err, err, err, err, err, escape, formatDateTime, getCallerStackFrame, getCommonMonitor, getCommonMonitor, getCommonMonitor, getContextClassLoader, getContextClassLoader, getDeepMessage, getErr, getLastSafeTimeMillis, getLog, getMaxDecDigits, getMaxHexDigits, getOriginalException, getOut, getRandom, getRandomBinary, getRandomBinary, getRandomString, getSafeTimeMillis, getStackFrame, getStackFrames, getStackTrace, getStackTrace, getThreadFactory, getTimeZone, getUpTimeMillis, hashCode, hexValue, indentString, indentString, isDecimal, isHex, isLogEcho, isOctal, log, log, log, log, log, makeInteger, makeLong, makeThread, octalValue, out, out, out, out, out, pad, parseBandwidth, parseBandwidth, parseDelimitedString, parseHex, parseHex, parseMemorySize, parseMemorySize, parsePercentage, parseTime, parseTime, parseTimeNanos, parseTimeNanos, printStackTrace, randomize, randomize, randomize, read, read, read, read, read, read, read, replace, setErr, setLog, setLogEcho, setOut, sleep, toBandwidthString, toBandwidthString, toCharEscape, toCrc, toCrc, toCrc, toCrc, toCrc, toDecString, toDelimitedString, toDelimitedString, toDelimitedString, toDelimitedString, toHex, toHex, toHexDump, toHexEscape, toHexEscape, toHexEscape, toHexEscape, toHexString, toMemorySizeString, toMemorySizeString, toQuotedCharEscape, toQuotedStringEscape, toSqlString, toString, toString, toStringEscape, toUnicodeEscape, trace, trace, trace, trace, trace, trace, trace, trace, trace, truncateString, truncateString, wait
protected Member m_memberPinned
public RemoteWorkManager(Member memberPinned)
public commonj.work.WorkItem schedule(commonj.work.Work work) throws commonj.work.WorkException, IllegalArgumentException
If a JVM that this pinned WorkManager represents has failed then a WorkRejectedException
will be thrown even if the remote JVM restarts. The pinned WorkManager must be refreshed by using a normal WorkManager and then acquiring a new pinned WorkManager.
schedule
in interface commonj.work.WorkManager
work
- the Work to executecommonj.work.WorkException
- thrown if queuing this up results in an exceptionIllegalArgumentException
- thrown if work is a javax.ejb.EnterpriseBean.public commonj.work.WorkItem schedule(commonj.work.Work work, commonj.work.WorkListener workListener) throws commonj.work.WorkException, IllegalArgumentException
If a JVM that this pinned WorkManager represents has failed then a WorkRejectedException
will be thrown even if the remote JVM restarts. The pinned WorkManager must be refreshed by using a normal WorkManager and then acquiring a new pinned WorkManager.
schedule
in interface commonj.work.WorkManager
work
- the Work to executeworkListener
- can be null or a WorkListener which is used to inform the application of the progress of a Work.commonj.work.WorkException
- thrown if queuing this up results in an exceptionIllegalArgumentException
- thrown if work is a javax.ejb.EnterpriseBean.protected commonj.work.WorkItem schedule(commonj.work.Work work, commonj.work.WorkListener workListener, Member member) throws commonj.work.WorkException
work
- the Work to executeworkListener
- an optional WorkListener which is used to inform the application of the progress of a Workmember
- the Member to execute the Work atcommonj.work.WorkException
- thrown if queuing this up results in an exceptionpublic boolean waitForAll(Collection collWorkItems, long lTimeoutMillis) throws InterruptedException, IllegalArgumentException
commonj.work.WorkManager
The WorkItems collection should not be altered once submitted until the method returns.
waitForAll
in interface commonj.work.WorkManager
collWorkItems
- the Collection of WorkItem objects to wait for.lTimeoutMillis
- the timout in milliseconds. If this is 0 then this method returns immediately.InterruptedException
- thrown if the wait is interrupted.IllegalArgumentException
- thrown if workItems is null, any of the objects in the collection are not WorkItems or the timeout_ms is negative.WorkManager.waitForAll(java.util.Collection, long)
public Collection waitForAny(Collection collWorkItems, long lTimeoutMillis) throws InterruptedException, IllegalArgumentException
commonj.work.WorkManager
The WorkItems collection should not be altered once submitted until the method returns.
waitForAny
in interface commonj.work.WorkManager
collWorkItems
- the Collection of WorkItem objects to wait for.lTimeoutMillis
- the timeout in ms. If this is 0 then the method returns immediately, i.e. does not block.InterruptedException
- thrown if the wait is interrupted.IllegalArgumentException
- thrown if workItems is null, any of the objects in the collection are not WorkItems or the timeout_ms is negative.WorkManager.waitForAny(java.util.Collection, long)