|
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 com.tangosol.coherence.servlet.SplitHttpSessionModel.SplittableHolder
public class SplitHttpSessionModel.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 | |
---|---|
SplitHttpSessionModel.SplittableHolder()
Default constructor for ExternalizableLite. |
|
SplitHttpSessionModel.SplittableHolder(String sName,
Object oValue)
Construct an AttributeHolder for a value. |
Method Summary | |
---|---|
protected Binary |
ensureInternalBinary()
Obtain the non-null cached binary form of the 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 NamedCache |
getExternalCache()
Obtain the cache that holds split-out (external) attribute values. |
protected String |
getExternalKey()
Build a key that will be used to access the binary value for this attribute holder that in the external cache. |
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(AbstractHttpSessionModel.AttributeHolder holderOrig)
Called when the attribute is bound. |
void |
onUnbound(boolean fReplaced)
Called when the attribute is unbound. |
protected void |
prepareWrite()
Called to test serialization; if the holder cannot serialize its value, it should throw an IO Exception at this point. |
protected Binary |
readBinary(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(DataOutput out,
Binary bin)
Write the binary value. |
Methods inherited from class com.tangosol.coherence.servlet.TraditionalHttpSessionModel.OptimizedHolder |
---|
deserializeValue, getBinary, getInternalBinary, getValue, readExternal, serializeValue, setInternalBinary, writeExternal |
Methods inherited from class com.tangosol.coherence.servlet.AbstractHttpSessionModel.AttributeHolder |
---|
getInternalValue, getName, isActivationListener, isBindingListener, isLocal, isSuspect, readExternal, setInternalValue, setLocal, setSuspect, writeExternal |
Constructor Detail |
---|
public SplitHttpSessionModel.SplittableHolder()
public SplitHttpSessionModel.SplittableHolder(String sName, Object oValue)
sName
- the attribute nameoValue
- the value of the attribute; not nullMethod Detail |
---|
public void onBound(AbstractHttpSessionModel.AttributeHolder holderOrig)
onBound
in class AbstractHttpSessionModel.AttributeHolder
holderOrig
- the holder that this new bound holder is
replacing, if any, otherwise nullpublic void onUnbound(boolean fReplaced)
onUnbound
in class AbstractHttpSessionModel.AttributeHolder
fReplaced
- set to true of this is the result of a bind
operation (so the holder is being replaced)protected void flush() throws IOException
flush
in class AbstractHttpSessionModel.AttributeHolder
IOException
protected Binary ensureInternalBinary()
ensureInternalBinary
in class TraditionalHttpSessionModel.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 externally
protected NamedCache getExternalCache()
protected String 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 IOException
prepareWrite
in class TraditionalHttpSessionModel.OptimizedHolder
IOException
- if the holder cannot serialize its valueprotected Binary readBinary(DataInput in) throws IOException
readBinary
in class TraditionalHttpSessionModel.OptimizedHolder
in
- the DataInput that this holder is being deserialized
from
IOException
protected void writeBinary(DataOutput out, Binary bin) throws IOException
writeBinary
in class TraditionalHttpSessionModel.OptimizedHolder
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 |