public class SplittableHolder extends OptimizedHolder
Base.LoggingWriter, Base.StackFrame| Constructor and Description |
|---|
SplittableHolder()
Default constructor for ExternalizableLite.
|
SplittableHolder(SplitHttpSessionModel model)
Construct an AttributeHolder for a value.
|
SplittableHolder(String sName, Object oValue, SplitHttpSessionModel model)
Construct an AttributeHolder for a value.
|
| Modifier and Type | Method and Description |
|---|---|
protected Object |
assignExternalKey(String sId)
Generate and set the key that will be used to access the binary value for this attribute holder that is in the external cache.
|
protected Binary |
ensureInternalBinary()
Obtain the non-null internally managed binary value.
|
protected void |
flush()
Called to flush the value to its data storage.
|
protected Binary |
getExternalBinary()
Obtain the binary form of the value from the external cache.
|
protected Object |
getExternalKey()
Build a key that will be used to access the binary value for this attribute holder that in the external cache.
|
Object |
getValue()
Obtain the object form of the value.
|
protected boolean |
isExternal()
Determine if the value is stored in the external cache.
|
protected boolean |
isExternalDesirable(Binary binValue)
Decide whether or not this holder will choose to store the passed binary value in its external storage.
|
void |
onBound(AttributeHolder holderOrig)
Called when the attribute is bound.
|
void |
onUnbound(boolean fReplaced, boolean fAll)
Called when the attribute is unbound.
|
protected void |
prepareWrite()
Called to test serialization; if the holder cannot serialize its value, it should throw an IOException at this point.
|
protected Binary |
readBinary(DataInput in)
Read the binary value.
|
protected void |
removeExternalBinary()
Remove the binary form of the value from the external cache.
|
protected void |
setExternal(boolean fExternal)
Specify that the value is stored in the external cache.
|
protected void |
setExternalBinary(Binary binValue)
Store the binary form of the value in the external cache.
|
protected void |
writeBinary(DataOutput out)
Write the binary value.
|
void |
writeExternal(DataOutput out)
Helper to write the object state to a stream.
|
deserializeValue, getBinary, getInternalBinary, readExternal, serializeValue, setInternalBinarygetInternalValue, getModel, getName, isActivationListener, isBindingListener, isEnableSuspectAttributes, isLocal, isSuspect, isSuspect, readExternal, setInternalValue, setLocal, setModel, setSuspect, writeExternalazzert, 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, 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, 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, waitpublic SplittableHolder()
public SplittableHolder(SplitHttpSessionModel model)
public SplittableHolder(String sName, Object oValue, SplitHttpSessionModel model)
sName - the attribute nameoValue - the value of the attribute; not nullpublic Object getValue()
getValue in class OptimizedHolderpublic void onBound(AttributeHolder holderOrig)
onBound in class AttributeHolderholderOrig - the holder that this new bound holder is replacing, if any, otherwise null
public void onUnbound(boolean fReplaced,
boolean fAll)
onUnbound in class AttributeHolderfReplaced - set to true of this is the result of a bind operation (so the holder is being replaced)fAll - true if this method is called within the context of an AbstractHttpSessionModel.unbind() call
protected void flush()
throws IOException
flush in class AttributeHolderIOException - on I/O errorpublic void writeExternal(DataOutput out) throws IOException
writeExternal in interface ExternalizableLitewriteExternal in class OptimizedHolderout - the stream to write the object toIOException - if an I/O exception occursprotected Binary ensureInternalBinary()
This method is explicitly NOT a "MAKE BINARY OUT OF VALUE" method. It is only intended to allow lazy loading of the pre-existing binary value, for example from a distributed cache.
ensureInternalBinary in class OptimizedHolderprotected boolean isExternal()
protected void setExternal(boolean fExternal)
fExternal - true if the object is stored in the external cacheprotected boolean isExternalDesirable(Binary binValue)
binValue - the binary value to evaluate to determine whether it should be stored internally or externallyprotected Object getExternalKey()
protected Object assignExternalKey(String sId)
sId - the session ID associated with this keyprotected Binary getExternalBinary()
protected void setExternalBinary(Binary binValue)
binValue - the binary form of the value to store in the external cacheprotected void removeExternalBinary()
protected void prepareWrite()
throws IOException
prepareWrite in class OptimizedHolderIOException - if the holder cannot serialize its valueprotected Binary readBinary(DataInput in) throws IOException
readBinary in class OptimizedHolderin - the DataInput that this holder is being deserialized fromIOException - on I/O errorprotected void writeBinary(DataOutput out) throws IOException
writeBinary in class OptimizedHolderout - the DataOutput that this holder is being serialized toIOException - on I/O error