Package com.tangosol.coherence.commonj
Class WorkManager.WorkHolder.Event
- java.lang.Object
-
- com.tangosol.util.Base
-
- com.tangosol.coherence.commonj.WorkManager.WorkHolder.Event
-
- All Implemented Interfaces:
commonj.work.WorkEvent
- Enclosing class:
- WorkManager.WorkHolder
protected class WorkManager.WorkHolder.Event extends Base implements commonj.work.WorkEvent
A WorkEvent implementation.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.tangosol.util.Base
Base.LoggingWriter
-
-
Constructor Summary
Constructors Constructor Description Event(int nType)
Construct a WorkEvent.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description commonj.work.WorkException
getException()
This returns the exception if any in the case of WORK_COMPLETED.int
getType()
Return an event type.commonj.work.WorkItem
getWorkItem()
This returns a WorkItem that represents the Work submitted to a WorkManager.String
toString()
-
Methods inherited from class com.tangosol.util.Base
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, getProcessRandom, getRandom, getRandomBinary, getRandomBinary, getRandomString, getSafeTimeMillis, getStackFrame, getStackFrames, getStackTrace, getStackTrace, getStackTrace, getThreadFactory, getTimeZone, getUpTimeMillis, hashCode, hexValue, indentString, indentString, isDecimal, isHex, isLogEcho, isOctal, log, log, log, log, log, makeInteger, makeLong, makeThread, mergeArray, mergeBooleanArray, mergeByteArray, mergeCharArray, mergeDoubleArray, mergeFloatArray, mergeIntArray, mergeLongArray, mod, mod, octalValue, out, out, out, out, out, pad, parseBandwidth, parseBandwidth, parseDelimitedString, parseHex, parseHex, parseMemorySize, parseMemorySize, parsePercentage, parseTime, parseTime, parseTimeNanos, parseTimeNanos, printStackTrace, randomize, 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
-
-
-
-
Constructor Detail
-
Event
public Event(int nType)
Construct a WorkEvent.A reason we only need to pass the event type to the constructor is that if some one holds a reference to an Event object, all other information could be retrieved from the parent WorkHolder and is not a subject to change.
- Parameters:
nType
- the event type
-
-
Method Detail
-
getType
public int getType()
Return an event type.- Specified by:
getType
in interfacecommonj.work.WorkEvent
- Returns:
- an event type
-
getWorkItem
public commonj.work.WorkItem getWorkItem()
Description copied from interface:commonj.work.WorkEvent
This returns a WorkItem that represents the Work submitted to a WorkManager. This WorkItem may not be the same WorkItem reference that was returned from the WorkManager.schedule() methods.- Specified by:
getWorkItem
in interfacecommonj.work.WorkEvent
- Returns:
- the WorkItem that this WorkEvent is for.
-
getException
public commonj.work.WorkException getException()
Description copied from interface:commonj.work.WorkEvent
This returns the exception if any in the case of WORK_COMPLETED.- Specified by:
getException
in interfacecommonj.work.WorkEvent
- Returns:
- the WorkException thrown if a Work completed with exception. Null if there is no exception.
-
-