|
Oracle® Coherence Java API Reference Release 3.7.1.0 E22843-01 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
com.tangosol.util.Base
com.tangosol.coherence.servlet.AttributeHolder
com.tangosol.coherence.servlet.OptimizedHolder
com.tangosol.coherence.servlet.SplittableHolder
public class SplittableHolder
An immutable object to hold attribute values and related information. In this AttributeHolder sub-class, the binary value will be null if it has not been serialized, empty if it is external and has not been fetched yet, or a valid binary value.
Constructor Summary | |
---|---|
SplittableHolder() Default constructor for ExternalizableLite. |
|
SplittableHolder(SplitHttpSessionModel model) Construct an AttributeHolder for a value. |
|
SplittableHolder(java.lang.String sName, java.lang.Object oValue, SplitHttpSessionModel model) Construct an AttributeHolder for a value. |
Method Summary | |
---|---|
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 java.lang.Object |
getExternalKey() Build a key that will be used to access the binary value for this attribute holder that in the external cache. |
java.lang.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(java.io.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(java.io.DataOutput out) Write the binary value. |
void |
writeExternal(java.io.DataOutput out) Helper to write the object state to a stream. |
Methods inherited from class com.tangosol.coherence.servlet.OptimizedHolder |
---|
deserializeValue, getBinary, getInternalBinary, readExternal, serializeValue, setInternalBinary |
Methods inherited from class com.tangosol.coherence.servlet.AttributeHolder |
---|
getInternalValue, getModel, getName, isActivationListener, isBindingListener, isEnableSuspectAttributes, isLocal, isSuspect, isSuspect, readExternal, setInternalValue, setLocal, setModel, setSuspect, writeExternal |
Constructor Detail |
---|
public SplittableHolder()
public SplittableHolder(SplitHttpSessionModel model)
public SplittableHolder(java.lang.String sName, java.lang.Object oValue, SplitHttpSessionModel model)
sName
- the attribute nameoValue
- the value of the attribute; not nullMethod Detail |
---|
public java.lang.Object getValue()
getValue
in class OptimizedHolder
public void onBound(AttributeHolder holderOrig)
onBound
in class AttributeHolder
holderOrig
- the holder that this new bound holder is replacing, if any, otherwise nullpublic void onUnbound(boolean fReplaced, boolean fAll)
onUnbound
in class AttributeHolder
fReplaced
- 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()
callprotected void flush() throws java.io.IOException
flush
in class AttributeHolder
java.io.IOException
- on I/O errorpublic void writeExternal(java.io.DataOutput out) throws java.io.IOException
writeExternal
in interface ExternalizableLite
writeExternal
in class OptimizedHolder
out
- the stream to write the object tojava.io.IOException
- 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 OptimizedHolder
protected 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 java.lang.Object getExternalKey()
protected 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 java.io.IOException
prepareWrite
in class OptimizedHolder
java.io.IOException
- if the holder cannot serialize its valueprotected Binary readBinary(java.io.DataInput in) throws java.io.IOException
readBinary
in class OptimizedHolder
in
- the DataInput that this holder is being deserialized fromjava.io.IOException
- on I/O errorprotected void writeBinary(java.io.DataOutput out) throws java.io.IOException
writeBinary
in class OptimizedHolder
out
- the DataOutput that this holder is being serialized tojava.io.IOException
- on I/O error
|
Oracle® Coherence Java API Reference Release 3.7.1.0 E22843-01 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |