Package com.tangosol.net.cache
Class AbstractEntryBundler.Bundle
- java.lang.Object
-
- com.tangosol.util.Base
-
- com.tangosol.net.cache.AbstractBundler.Bundle
-
- com.tangosol.net.cache.AbstractEntryBundler.Bundle
-
- Enclosing class:
- AbstractEntryBundler
protected class AbstractEntryBundler.Bundle extends AbstractBundler.Bundle
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.tangosol.util.Base
Base.LoggingWriter
-
-
Field Summary
-
Fields inherited from class com.tangosol.net.cache.AbstractBundler.Bundle
STATUS_EXCEPTION, STATUS_OPEN, STATUS_PENDING, STATUS_PROCESSED
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedBundle()Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanadd(Object oKey, Object oValue)Add the specified entry to the Bundle.protected booleanaddAll(Map map)Add the specified collection of entries to the Bundle.protected voidensureResults()Obtain results of the bundled requests.protected intgetBundleSize()Obtain this bundle size.protected voidprocess(boolean fBurst, Object oKey, Object oValue)Process the specified entry according to this Bundle state.protected voidprocessAll(boolean fBurst, Map map)Process the specified collection of entries according to this Bundle state.protected booleanreleaseThread()Release all bundle resources associated with the current thread.-
Methods inherited from class com.tangosol.net.cache.AbstractBundler.Bundle
ensureResults, formatStatusName, isException, isMaster, isOpen, isPending, isProcessed, resetStatistics, setMaster, setStatus, toString, waitForResults
-
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, newHashMap, newHashMap, newHashSet, newHashSet, 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
-
-
-
-
Method Detail
-
add
protected boolean add(Object oKey, Object oValue)
Add the specified entry to the Bundle.Note: a call to this method must be externally synchronized for this Bundle object.
- Parameters:
oKey- the entry keyoValue- the entry value- Returns:
- true if this Bundle was empty prior to this call
-
addAll
protected boolean addAll(Map map)
Add the specified collection of entries to the Bundle.Note: a call to this method must be externally synchronized for this Bundle object.
- Parameters:
map- the collection of entries- Returns:
- true if this Bundle was empty prior to this call
-
process
protected void process(boolean fBurst, Object oKey, Object oValue)Process the specified entry according to this Bundle state.- Parameters:
fBurst- true if this thread is supposed to perform an actual bundled operation (burst); false otherwiseoKey- the entry keyoValue- the entry value
-
processAll
protected void processAll(boolean fBurst, Map map)Process the specified collection of entries according to this Bundle state.- Parameters:
fBurst- true if this thread is supposed to perform an actual bundled operation (burst); false otherwisemap- the collection of entries
-
getBundleSize
protected int getBundleSize()
Obtain this bundle size. The return value should be expressed in the same units as the value returned by thegetSizeThresholdmethod.- Overrides:
getBundleSizein classAbstractBundler.Bundle- Returns:
- the bundle size
-
ensureResults
protected void ensureResults()
Obtain results of the bundled requests. This method should be implemented by concrete Bundle implementations using the most efficient mechanism.- Specified by:
ensureResultsin classAbstractBundler.Bundle
-
releaseThread
protected boolean releaseThread()
Release all bundle resources associated with the current thread.- Overrides:
releaseThreadin classAbstractBundler.Bundle- Returns:
- true iff all entered threads have released
-
-