|
Oracle® Coherence Java API Reference Release 3.6.0.0 E15725-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(String sName, Object oValue) Construct an OptimizedHolder for a value. |
Method Summary | |
---|---|
protected 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. |
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(DataInput in) Read the binary value. |
void |
readExternal(DataInput in) Helper to read the object state from a stream. |
protected Binary |
serializeValue(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(DataOutput out) Write the binary value. |
void |
writeExternal(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, isEnableSuspectAttributes, isLocal, isSuspect, isSuspect, onBound, onUnbound, readExternal, setInternalValue, setLocal, setSuspect, writeExternal |
Constructor Detail |
---|
public TraditionalHttpSessionModel.OptimizedHolder()
public TraditionalHttpSessionModel.OptimizedHolder(String sName, Object oValue)
sName
- the attribute nameoValue
- the value of the attribute; not nullMethod Detail |
---|
public Object getValue()
getValue
in class AbstractHttpSessionModel.AttributeHolder
public Binary getBinary()
public void readExternal(DataInput in) throws IOException
readExternal
in interface ExternalizableLite
readExternal
in class AbstractHttpSessionModel.AttributeHolder
in
- the stream to read data from in order to restore the objectIOException
- if an I/O exception occurspublic void writeExternal(DataOutput out) throws IOException
writeExternal
in interface ExternalizableLite
writeExternal
in class AbstractHttpSessionModel.AttributeHolder
out
- the stream to write the object toIOException
- 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(Object o)
o
- the object to serializeprotected Object deserializeValue(Binary bin)
bin
- the binary value to deserializeprotected void prepareWrite() throws IOException
prepareWrite
in class AbstractHttpSessionModel.AttributeHolder
IOException
- if the holder cannot serialize its valueprotected Binary readBinary(DataInput in) throws IOException
in
- the DataInput that this holder is being deserialized fromIOException
- on I/O errorprotected void writeBinary(DataOutput out) throws IOException
out
- the DataOutput that this holder is being serialized toIOException
- on I/O error
|
Oracle® Coherence Java API Reference Release 3.6.0.0 E15725-01 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |