|
Oracle® Coherence Java API Reference v3.5 E14977-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.AbstractHttpSessionModel.AttributeHolder
com.tangosol.coherence.servlet.TraditionalHttpSessionModel.OptimizedHolder
public class TraditionalHttpSessionModel.OptimizedHolder
An immutable object to hold attribute values and related information.
Constructor Summary | |
---|---|
TraditionalHttpSessionModel.OptimizedHolder() Default constructor is required for deserialization purposes. |
|
TraditionalHttpSessionModel.OptimizedHolder(java.lang.String sName, java.lang.Object oValue) Construct an OptimizedHolder for a value. |
Method Summary | |
---|---|
protected java.lang.Object |
deserializeValue(Binary bin) Take the Binary form of the attribute value and turn it into the object value. |
protected Binary |
ensureInternalBinary() Obtain the non-null internally managed binary value. |
Binary |
getBinary() Obtain the binary form of the value. |
protected Binary |
getInternalBinary() Obtain the internally managed binary value. |
java.lang.Object |
getValue() Obtain the object form of the value. |
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. |
void |
readExternal(java.io.DataInput in) Helper to read the object state from a stream. |
protected Binary |
serializeValue(java.lang.Object o) Take the passed object and turn it into a Binary value. |
protected void |
setInternalBinary(Binary binValue) Store the internally managed binary value. |
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.AbstractHttpSessionModel.AttributeHolder |
---|
flush, getInternalValue, getModel, getName, isActivationListener, isBindingListener, isLocal, isSuspect, onBound, onUnbound, readExternal, setInternalValue, setLocal, setSuspect, writeExternal |
Constructor Detail |
---|
public TraditionalHttpSessionModel.OptimizedHolder()
public TraditionalHttpSessionModel.OptimizedHolder(java.lang.String sName, java.lang.Object oValue)
sName
- the attribute nameoValue
- the value of the attribute; not nullMethod Detail |
---|
public java.lang.Object getValue()
getValue
in class AbstractHttpSessionModel.AttributeHolder
public Binary getBinary()
public void readExternal(java.io.DataInput in) throws java.io.IOException
readExternal
in interface ExternalizableLite
readExternal
in class AbstractHttpSessionModel.AttributeHolder
in
- the stream to read data from in order to restore the objectjava.io.IOException
- if an I/O exception occurspublic void writeExternal(java.io.DataOutput out) throws java.io.IOException
writeExternal
in interface ExternalizableLite
writeExternal
in class AbstractHttpSessionModel.AttributeHolder
out
- the stream to write the object tojava.io.IOException
- if an I/O exception occursprotected Binary getInternalBinary()
protected 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.
protected void setInternalBinary(Binary binValue)
binValue
- the binary form of the valueprotected Binary serializeValue(java.lang.Object o)
o
- the object to serializeprotected java.lang.Object deserializeValue(Binary bin)
bin
- the binary value to deserializeprotected void prepareWrite() throws java.io.IOException
prepareWrite
in class AbstractHttpSessionModel.AttributeHolder
java.io.IOException
- if the holder cannot serialize its valueprotected Binary readBinary(java.io.DataInput in) throws java.io.IOException
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
out
- the DataOutput that this holder is being serialized tojava.io.IOException
- on I/O error
|
Oracle® Coherence Java API Reference v3.5 E14977-01 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |