org.codehaus.wadi.impl
Class HybridRelocater

java.lang.Object
  extended byorg.codehaus.wadi.impl.AbstractRelocater
      extended byorg.codehaus.wadi.impl.HybridRelocater
All Implemented Interfaces:
Relocater
Direct Known Subclasses:
WebHybridRelocater

public class HybridRelocater
extends AbstractRelocater

Combine various RelocationStrategies to produce a cleverer one

Version:
$Revision: 1430 $
Author:
Jules Gosnell

Field Summary
protected  long _ackTimeout
           
protected  Contextualiser _contextualiser
           
protected  Dispatcher _dispatcher
           
protected  Log _lockLog
           
protected  Log _log
           
protected  String _nodeName
           
protected  InvocationProxy _proxy
           
protected  long _requestHandOverTimeout
           
protected  long _resTimeout
           
protected  boolean _sessionOrRequestPreferred
           
protected  SynchronizedBoolean _shuttingDown
           
 
Fields inherited from class org.codehaus.wadi.impl.AbstractRelocater
_config
 
Constructor Summary
HybridRelocater(long resTimeout, long ackTimeout, boolean sessionOrRequestPreferred)
           
 
Method Summary
 void init(RelocaterConfig config)
           
 void onMessage(ObjectMessage om, RelocationRequest request)
           
 boolean relocate(InvocationContext invocationContext, String name, Immoter immoter, Sync motionLock)
          Either relocate the request to the session by proxying/redirection, or the session to the request, by migration...
protected  void relocateRequestToUs(ObjectMessage om, String sessionName)
           
protected  void relocateSessionToThem(ObjectMessage om, String sessionName, String nodeName)
           
 
Methods inherited from class org.codehaus.wadi.impl.AbstractRelocater
destroy
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_log

protected final Log _log

_requestHandOverTimeout

protected final long _requestHandOverTimeout
See Also:
Constant Field Values

_resTimeout

protected final long _resTimeout

_ackTimeout

protected final long _ackTimeout

_sessionOrRequestPreferred

protected final boolean _sessionOrRequestPreferred

_lockLog

protected final Log _lockLog

_shuttingDown

protected SynchronizedBoolean _shuttingDown

_dispatcher

protected Dispatcher _dispatcher

_nodeName

protected String _nodeName

_contextualiser

protected Contextualiser _contextualiser

_proxy

protected InvocationProxy _proxy
Constructor Detail

HybridRelocater

public HybridRelocater(long resTimeout,
                       long ackTimeout,
                       boolean sessionOrRequestPreferred)
Method Detail

init

public void init(RelocaterConfig config)
Specified by:
init in interface Relocater
Overrides:
init in class AbstractRelocater

relocate

public boolean relocate(InvocationContext invocationContext,
                        String name,
                        Immoter immoter,
                        Sync motionLock)
                 throws InvocationException
Description copied from interface: Relocater
Either relocate the request to the session by proxying/redirection, or the session to the request, by migration...

Parameters:
invocationContext -
name -
immoter -
motionLock -
Returns:
- whether, or not, the request was contextualised
Throws:
InvocationException

onMessage

public void onMessage(ObjectMessage om,
                      RelocationRequest request)

relocateSessionToThem

protected void relocateSessionToThem(ObjectMessage om,
                                     String sessionName,
                                     String nodeName)

relocateRequestToUs

protected void relocateRequestToUs(ObjectMessage om,
                                   String sessionName)


Copyright © 2004-2008 Core Developers Network Ltd.. All Rights Reserved.