org.codehaus.wadi.impl
Class SimpleContextualiserStack
java.lang.Object
org.codehaus.wadi.impl.SimpleContextualiserStack
- All Implemented Interfaces:
- Contextualiser, Lifecycle
- public class SimpleContextualiserStack
- extends Object
- implements Contextualiser
Method Summary |
boolean |
contextualise(InvocationContext invocationContext,
String id,
Immoter immoter,
Sync motionLock,
boolean exclusiveOnly)
|
void |
destroy()
|
void |
findRelevantSessionNames(int numPartitions,
Collection[] resultSet)
|
Immoter |
getDemoter(String name,
Motable motable)
Return a Demoter to the first Contextualiser which would be happy to accept this Motable - in other words - would not evict() it. |
Evicter |
getEvicter()
|
int |
getLocalSessionCount()
|
Immoter |
getSharedDemoter()
|
Contextualiser |
getTop()
|
void |
init(ContextualiserConfig config)
|
boolean |
isExclusive()
|
void |
load(Emoter emoter,
Immoter immoter)
|
void |
promoteToExclusive(Immoter immoter)
|
void |
setLastAccessedTime(Evictable evictable,
long oldTime,
long newTime)
|
void |
setMaxInactiveInterval(Evictable evictable,
int oldInterval,
int newInterval)
|
void |
start()
|
void |
stop()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_log
protected final Log _log
_streamer
protected final Streamer _streamer
_collapser
protected final Collapser _collapser
_dummy
protected final DummyContextualiser _dummy
_databaseDataSource
protected final DataSource _databaseDataSource
_databaseTable
protected final String _databaseTable
_databaseEvicter
protected Evicter _databaseEvicter
_database
protected final SharedStoreContextualiser _database
_clusterRelocater
protected final Relocater _clusterRelocater
_cluster
protected final ClusterContextualiser _cluster
_statelessMethods
protected final Pattern _statelessMethods
_statelessMethodFlag
protected final boolean _statelessMethodFlag
_statelessURIs
protected final Pattern _statelessURIs
_statelessURIFlag
protected final boolean _statelessURIFlag
_stateless
protected final StatelessContextualiser _stateless
_discDirectory
protected final File _discDirectory
_discEvicter
protected final Evicter _discEvicter
_discMap
protected final Map _discMap
_disc
protected final ExclusiveStoreContextualiser _disc
_serial
protected final SerialContextualiser _serial
_memoryPool
protected final ContextPool _memoryPool
_requestPool
protected final PoolableInvocationWrapperPool _requestPool
_memoryEvicter
protected final Evicter _memoryEvicter
_memoryMap
protected final Map _memoryMap
_memory
protected final MemoryContextualiser _memory
SimpleContextualiserStack
public SimpleContextualiserStack(Map sessionMap,
ContextPool pool,
DataSource dataSource,
Relocater relocater)
throws Exception
contextualise
public boolean contextualise(InvocationContext invocationContext,
String id,
Immoter immoter,
Sync motionLock,
boolean exclusiveOnly)
throws InvocationException
- Specified by:
contextualise
in interface Contextualiser
- Throws:
InvocationException
getEvicter
public Evicter getEvicter()
isExclusive
public boolean isExclusive()
- Specified by:
isExclusive
in interface Contextualiser
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
getSharedDemoter
public Immoter getSharedDemoter()
- Specified by:
getSharedDemoter
in interface Contextualiser
init
public void init(ContextualiserConfig config)
- Specified by:
init
in interface Contextualiser
start
public void start()
throws Exception
- Specified by:
start
in interface Lifecycle
- Throws:
Exception
stop
public void stop()
throws Exception
- Specified by:
stop
in interface Lifecycle
- Throws:
Exception
destroy
public void destroy()
- Specified by:
destroy
in interface Contextualiser
promoteToExclusive
public void promoteToExclusive(Immoter immoter)
- Specified by:
promoteToExclusive
in interface Contextualiser
load
public void load(Emoter emoter,
Immoter immoter)
- Specified by:
load
in interface Contextualiser
setLastAccessedTime
public void setLastAccessedTime(Evictable evictable,
long oldTime,
long newTime)
- Specified by:
setLastAccessedTime
in interface Contextualiser
setMaxInactiveInterval
public void setMaxInactiveInterval(Evictable evictable,
int oldInterval,
int newInterval)
- Specified by:
setMaxInactiveInterval
in interface Contextualiser
getTop
public Contextualiser getTop()
findRelevantSessionNames
public void findRelevantSessionNames(int numPartitions,
Collection[] resultSet)
- Specified by:
findRelevantSessionNames
in interface Contextualiser
getLocalSessionCount
public int getLocalSessionCount()
- Specified by:
getLocalSessionCount
in interface Contextualiser
Copyright © 2004-2008 Core Developers Network Ltd.. All Rights Reserved.