|
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
public class OptimizedHolder
An immutable object to hold attribute values and related information.
Constructor Summary | |
---|---|
OptimizedHolder() Default constructor is required for deserialization purposes. |
|
OptimizedHolder(java.lang.String sName, java.lang.Object oValue, TraditionalHttpSessionModel model) Construct an OptimizedHolder for a value. |
|
OptimizedHolder(TraditionalHttpSessionModel model) Default constructor is required for deserialization purposes. |
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.AttributeHolder |
---|
flush, getInternalValue, getModel, getName, isActivationListener, isBindingListener, isEnableSuspectAttributes, isLocal, isSuspect, isSuspect, onBound, onUnbound, readExternal, setInternalValue, setLocal, setModel, setSuspect, writeExternal |
Constructor Detail |
---|
public OptimizedHolder()
public OptimizedHolder(TraditionalHttpSessionModel model)
public OptimizedHolder(java.lang.String sName, java.lang.Object oValue, TraditionalHttpSessionModel model)
sName
- the attribute nameoValue
- the value of the attribute; not nullMethod Detail |
---|
public java.lang.Object getValue()
getValue
in class AttributeHolder
public Binary getBinary()
public void readExternal(java.io.DataInput in) throws java.io.IOException
readExternal
in interface ExternalizableLite
readExternal
in class 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 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 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 Release 3.7.1.0 E22843-01 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |