org.codehaus.wadi.impl
Class SharedStoreContextualiser
java.lang.Object
org.codehaus.wadi.impl.AbstractContextualiser
org.codehaus.wadi.impl.AbstractChainedContextualiser
org.codehaus.wadi.impl.AbstractMotingContextualiser
org.codehaus.wadi.impl.AbstractSharedContextualiser
org.codehaus.wadi.impl.SharedStoreContextualiser
- All Implemented Interfaces:
- Contextualiser, Lifecycle
- public class SharedStoreContextualiser
- extends AbstractSharedContextualiser
A Contextualiser which stores its Contexts in a shared database via JDBC.
On shutdown of the cluster's last node, all extant sessions will be demoted to here.
On startup of the cluster's first node, all sessions stored here will be promoted upwards.
- Version:
- $Revision: 1430 $
- Author:
- Jules Gosnell
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_store
protected final DatabaseStore _store
_immoter
protected final Immoter _immoter
_emoter
protected final Emoter _emoter
SharedStoreContextualiser
public SharedStoreContextualiser(Contextualiser next,
Collapser collapser,
boolean clean,
DatabaseStore store)
getStartInfo
public String getStartInfo()
- Overrides:
getStartInfo
in class AbstractContextualiser
init
public void init(ContextualiserConfig config)
- Specified by:
init
in interface Contextualiser
- Overrides:
init
in class AbstractMotingContextualiser
getImmoter
public Immoter getImmoter()
- Specified by:
getImmoter
in class AbstractMotingContextualiser
- Returns:
- - an Immoter that facilitates insertion of Motables into this Contextualiser's own store
getEmoter
public Emoter getEmoter()
- Specified by:
getEmoter
in class AbstractMotingContextualiser
- Returns:
- - an Emoter that facilitates removal of Motables from this Contextualiser's own store
getDemoter
public Immoter getDemoter(String name,
Motable motable)
- Description copied from interface:
Contextualiser
- Return a Demoter to the first Contextualiser which would be happy to accept this Motable - in other words - would not evict() it.
- Specified by:
getDemoter
in interface Contextualiser
- Overrides:
getDemoter
in class AbstractSharedContextualiser
get
public Motable get(String id)
- Specified by:
get
in class AbstractMotingContextualiser
load
public void load(Emoter emoter,
Immoter immoter)
getEvictionEmoter
public Emoter getEvictionEmoter()
expire
public void expire(Motable motable)
contextualise
public boolean contextualise(InvocationContext invocationContext,
String id,
Immoter immoter,
Sync motionLock,
boolean exclusiveOnly)
throws InvocationException
- Shared Contextualisers do nothing at runtime. They exist only to load data at startup and store it at shutdown.
- Specified by:
contextualise
in interface Contextualiser
- Overrides:
contextualise
in class AbstractMotingContextualiser
- Throws:
InvocationException
Copyright © 2004-2006 Core Developers Network Ltd.. All Rights Reserved.