org.codehaus.wadi.core.contextualiser
Class ClusterContextualiser

java.lang.Object
  extended by org.codehaus.wadi.core.contextualiser.AbstractChainedContextualiser
      extended by org.codehaus.wadi.core.contextualiser.AbstractMotingContextualiser
          extended by org.codehaus.wadi.core.contextualiser.AbstractSharedContextualiser
              extended by org.codehaus.wadi.core.contextualiser.ClusterContextualiser
All Implemented Interfaces:
Contextualiser, Lifecycle

public class ClusterContextualiser
extends AbstractSharedContextualiser

Version:
$Revision: 2415 $
Author:
Jules Gosnell

Field Summary
 
Fields inherited from class org.codehaus.wadi.core.contextualiser.AbstractChainedContextualiser
next
 
Constructor Summary
ClusterContextualiser(Contextualiser next, Relocater relocater, PartitionManager partitionManager, StateManager stateManager, java.util.concurrent.atomic.AtomicBoolean shuttingDown)
           
 
Method Summary
protected  Motable get(java.lang.String id, boolean exclusiveOnly)
           
 Immoter getDemoter(java.lang.String name, Motable motable)
          Return an immoter to the first Contextualiser below us, which would be happy to accept this Motable - in other words - would not evict() it.
 Emoter getEmoter()
           
 Immoter getImmoter()
           
 Immoter getSharedDemoter()
          Return an Immoter to the first SharedContextualiser below us.
protected  boolean handle(Invocation invocation, java.lang.String id, Immoter immoter, boolean exclusiveOnly)
           
 
Methods inherited from class org.codehaus.wadi.core.contextualiser.AbstractSharedContextualiser
contextualise, getSessionNames, load, promoteToExclusive
 
Methods inherited from class org.codehaus.wadi.core.contextualiser.AbstractMotingContextualiser
getPromoter, promote
 
Methods inherited from class org.codehaus.wadi.core.contextualiser.AbstractChainedContextualiser
doFindRelevantSessionNames, doStart, doStop, findRelevantSessionNames, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClusterContextualiser

public ClusterContextualiser(Contextualiser next,
                             Relocater relocater,
                             PartitionManager partitionManager,
                             StateManager stateManager,
                             java.util.concurrent.atomic.AtomicBoolean shuttingDown)
Method Detail

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(java.lang.String name,
                          Motable motable)
Description copied from interface: Contextualiser
Return an immoter to the first Contextualiser below us, 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
Parameters:
name - - uid of the Motable
motable - - the Motable in question
Returns:
- a Demoter - a delegate capable of arranging immotion into the correct Contextualiser

getSharedDemoter

public Immoter getSharedDemoter()
Description copied from interface: Contextualiser
Return an Immoter to the first SharedContextualiser below us.

Specified by:
getSharedDemoter in interface Contextualiser
Overrides:
getSharedDemoter in class AbstractSharedContextualiser
Returns:
the Immoter

handle

protected boolean handle(Invocation invocation,
                         java.lang.String id,
                         Immoter immoter,
                         boolean exclusiveOnly)
                  throws InvocationException
Overrides:
handle in class AbstractMotingContextualiser
Throws:
InvocationException

get

protected Motable get(java.lang.String id,
                      boolean exclusiveOnly)
Specified by:
get in class AbstractMotingContextualiser


Copyright © 2008. All Rights Reserved.