org.codehaus.wadi.core.session
Class AtomicallyReplicableSession
java.lang.Object
org.codehaus.wadi.core.eviction.SimpleEvictable
org.codehaus.wadi.core.motable.AbstractMotable
org.codehaus.wadi.core.session.StandardSession
org.codehaus.wadi.core.session.DistributableSession
org.codehaus.wadi.core.session.AbstractReplicableSession
org.codehaus.wadi.core.session.AtomicallyReplicableSession
- All Implemented Interfaces:
- java.io.Externalizable, java.io.Serializable, Evictable, Motable, Session
- Direct Known Subclasses:
- BasicWebSession
public class AtomicallyReplicableSession
- extends AbstractReplicableSession
- Version:
- $Revision: 1497 $
- Author:
- Jules Gosnell
- See Also:
- Serialized Form
Field Summary |
protected boolean |
dirty
|
protected org.codehaus.wadi.core.session.AtomicallyReplicableSession.Semantics |
semantics
|
Method Summary |
java.lang.Object |
getState(java.lang.Object key)
this will sometimes dirty the session, since we are giving away
a ref to something inside the session which may then be
modified without our knowledge - strictly speaking, if we are
using ByReference semantics, this dirties. |
protected boolean |
isDirty()
|
protected void |
onAddSate(java.lang.Object key,
java.lang.Object oldValue,
java.lang.Object newValue)
|
protected void |
onDestroy()
|
void |
onEndProcessing()
|
protected void |
onRemoveState(java.lang.Object key,
java.lang.Object oldValue)
|
void |
setMaxInactiveInterval(int maxInactiveInterval)
if MII changes - dirties the session metadata - might this be distributed
separately ? we could probably distribute this as a delta, since there
are no object reference issues - it would be crazy to send the whole
session to update this. |
Methods inherited from class org.codehaus.wadi.core.motable.AbstractMotable |
copy, getAbstractMotableMemento, getName, getReadWriteLock, init, initExisting, isNew, mote, newReadWriteLock, onDeserialization, rehydrate, restore |
Methods inherited from class org.codehaus.wadi.core.eviction.SimpleEvictable |
copy, getCreationTime, getLastAccessedTime, getMaxInactiveInterval, getTimedOut, getTimeToLive, init, mote, onSerialization, readExternal, setLastAccessedTime, writeExternal |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.io.Externalizable |
readExternal, writeExternal |
dirty
protected transient boolean dirty
semantics
protected transient org.codehaus.wadi.core.session.AtomicallyReplicableSession.Semantics semantics
AtomicallyReplicableSession
public AtomicallyReplicableSession(DistributableAttributes attributes,
Manager manager,
Streamer streamer,
ReplicationManager replicationManager)
onEndProcessing
public void onEndProcessing()
- Specified by:
onEndProcessing
in interface Session
- Overrides:
onEndProcessing
in class AbstractReplicableSession
isDirty
protected boolean isDirty()
- Overrides:
isDirty
in class AbstractReplicableSession
setMaxInactiveInterval
public void setMaxInactiveInterval(int maxInactiveInterval)
- if MII changes - dirties the session metadata - might this be distributed
separately ? we could probably distribute this as a delta, since there
are no object reference issues - it would be crazy to send the whole
session to update this.
- Specified by:
setMaxInactiveInterval
in interface Evictable
- Overrides:
setMaxInactiveInterval
in class SimpleEvictable
getState
public java.lang.Object getState(java.lang.Object key)
- this will sometimes dirty the session, since we are giving away
a ref to something inside the session which may then be
modified without our knowledge - strictly speaking, if we are
using ByReference semantics, this dirties. If we are using
ByValue semantics, it does not.
- Specified by:
getState
in interface Session
- Overrides:
getState
in class StandardSession
onAddSate
protected void onAddSate(java.lang.Object key,
java.lang.Object oldValue,
java.lang.Object newValue)
- Overrides:
onAddSate
in class StandardSession
onRemoveState
protected void onRemoveState(java.lang.Object key,
java.lang.Object oldValue)
- Overrides:
onRemoveState
in class StandardSession
onDestroy
protected void onDestroy()
- Overrides:
onDestroy
in class StandardSession
Copyright © 2011. All Rights Reserved.