|
CoherenceTM v3.3 Copyright© 2000-2007 by Oracle Corporation |
|||||||
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,
Binary bin)
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, getName, isActivationListener, isBindingListener, isLocal, 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
object
IOException
- 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 to
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(Object o)
protected Object deserializeValue(Binary bin)
protected 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
from
IOException
protected void writeBinary(DataOutput out, Binary bin) throws IOException
out
- the DataOutput that this holder is being serialized tobin
- the Binary value to write
IOException
|
CoherenceTM v3.3 Copyright© 2000-2007 by Oracle Corporation |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |