org.codehaus.wadi.impl
Class AbstractExclusiveContextualiser
java.lang.Object
org.codehaus.wadi.impl.AbstractContextualiser
org.codehaus.wadi.impl.AbstractChainedContextualiser
org.codehaus.wadi.impl.AbstractMotingContextualiser
org.codehaus.wadi.impl.AbstractExclusiveContextualiser
- All Implemented Interfaces:
- Config, Contextualiser, EvicterConfig, Lifecycle
- Direct Known Subclasses:
- ExclusiveStoreContextualiser, GiannisContextualiser, MemoryContextualiser
- public abstract class AbstractExclusiveContextualiser
- extends AbstractMotingContextualiser
- implements EvicterConfig
Basic implementation for Contextualisers which maintain a local Map of references
to Motables.
- Version:
- $Revision: 1430 $
- Author:
- Jules Gosnell
_map
protected final Map _map
_evicter
protected final Evicter _evicter
_stringPrefix
protected String _stringPrefix
_stringSuffix
protected String _stringSuffix
AbstractExclusiveContextualiser
public AbstractExclusiveContextualiser(Contextualiser next,
Locker locker,
boolean clean,
Evicter evicter,
Map map)
toString
public String toString()
get
public Motable get(String id)
- Specified by:
get in class AbstractMotingContextualiser
handle
public boolean handle(InvocationContext invocationContext,
String id,
Immoter immoter,
Sync motionLock)
throws InvocationException
- Overrides:
handle in class AbstractMotingContextualiser
- Throws:
InvocationException
getEvictionEmoter
public Emoter getEvictionEmoter()
- Specified by:
getEvictionEmoter in interface EvicterConfig
unload
protected void unload()
init
public void init(ContextualiserConfig config)
- Specified by:
init in interface Contextualiser- Overrides:
init in class AbstractMotingContextualiser
start
public void start()
throws Exception
- Specified by:
start in interface Lifecycle- Overrides:
start in class AbstractChainedContextualiser
- Throws:
Exception
stop
public void stop()
throws Exception
- Specified by:
stop in interface Lifecycle- Overrides:
stop in class AbstractChainedContextualiser
- Throws:
Exception
destroy
public void destroy()
- Specified by:
destroy in interface Contextualiser- Overrides:
destroy in class AbstractMotingContextualiser
load
public void load(Emoter emoter,
Immoter immoter)
- Specified by:
load in interface Contextualiser
getEvicter
public Evicter getEvicter()
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
- Parameters:
name - - uid of the Motablemotable - - the Motable in question
- Returns:
- - a Demoter - a delegate capable of arranging immotion into the correct Contextualiser
getLocalSessionCount
public int getLocalSessionCount()
- Specified by:
getLocalSessionCount in interface Contextualiser
getSize
public int getSize()
getMap
public Map getMap()
- Specified by:
getMap in interface EvicterConfig
getTimer
public Timer getTimer()
- Specified by:
getTimer in interface EvicterConfig
getEvictionLock
public Sync getEvictionLock(String id,
Motable motable)
- Specified by:
getEvictionLock in interface EvicterConfig
demote
public void demote(Motable emotable)
- Specified by:
demote in interface EvicterConfig
getMaxInactiveInterval
public int getMaxInactiveInterval()
- Specified by:
getMaxInactiveInterval in interface EvicterConfig
findRelevantSessionNames
public void findRelevantSessionNames(int numPartitions,
Collection[] resultSet)
- Specified by:
findRelevantSessionNames in interface Contextualiser- Overrides:
findRelevantSessionNames in class AbstractChainedContextualiser
Copyright © 2004-2008 Core Developers Network Ltd.. All Rights Reserved.