protected abstract class AbstractBundler.Bundle extends Base
Base.LoggingWriter, Base.StackFrame
Modifier and Type | Field and Description |
---|---|
static int |
STATUS_EXCEPTION
Attempt to bundle encountered and exception; the execution has to be
de-optimized and performed by individual threads.
|
static int |
STATUS_OPEN
This Bundle accepting additional items.
|
static int |
STATUS_PENDING
This Bundle is closed for accepting additional items and awaiting
for the execution results.
|
static int |
STATUS_PROCESSED
This Bundle is in process of returning the result of execution
back to the client.
|
Modifier | Constructor and Description |
---|---|
protected |
Bundle()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
protected abstract void |
ensureResults()
Obtain results of the bundled requests.
|
protected boolean |
ensureResults(boolean fBurst)
Obtain results of the bundled requests or ensure that the results
have already been retrieved.
|
protected String |
formatStatusName(int iStatus)
Return a human readable name for the specified status value.
|
protected int |
getBundleSize()
Obtain this bundle size.
|
protected boolean |
isException()
Check whether or not this bundle is in the "exception" state -
bundled execution threw an exception and requests have to be
un-bundled.
|
protected boolean |
isMaster()
Check whether or not this is a "master" Bundle.
|
protected boolean |
isOpen()
Check whether or not this bundle is open for adding request elements.
|
protected boolean |
isPending()
Check whether or not this bundle is in the "pending" state - awaiting
for the execution results.
|
protected boolean |
isProcessed()
Check whether or not this bundle is in the "processed" state -
ready to return the result of execution back to the client.
|
protected boolean |
releaseThread()
Release all bundle resources associated with the current thread.
|
void |
resetStatistics()
Reset statistics for this Bundle.
|
protected void |
setMaster()
Designate this Bundle as a "master" bundle.
|
protected void |
setStatus(int iStatus)
Change the status of this Bundle.
|
String |
toString()
Provide a human readable description for the Bundle object
(for debugging).
|
protected boolean |
waitForResults(boolean fFirst)
Wait until results of bundled requests are retrieved.
|
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, getThreadFactory, getTimeZone, getUpTimeMillis, hashCode, hexValue, indentString, indentString, isDecimal, isHex, isLogEcho, isOctal, log, log, log, log, log, makeInteger, makeLong, makeThread, 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
public static final int STATUS_OPEN
public static final int STATUS_PENDING
public static final int STATUS_PROCESSED
public static final int STATUS_EXCEPTION
protected boolean isOpen()
protected boolean isPending()
protected boolean isProcessed()
protected boolean isException()
protected void setStatus(int iStatus)
iStatus
- the new status valueprotected int getBundleSize()
getSizeThreshold
method.protected boolean isMaster()
protected void setMaster()
protected abstract void ensureResults()
protected boolean waitForResults(boolean fFirst)
Note that calls to this method must be externally synchronized.
fFirst
- true iff this is the first thread entering the bundleprotected boolean ensureResults(boolean fBurst)
fBurst
- specifies whether or not the actual results have to be
fetched on this thread; this parameter will be true
for one and only one thread per bundleprotected boolean releaseThread()
public void resetStatistics()
public String toString()
protected String formatStatusName(int iStatus)
iStatus
- the status value to format