org.objectweb.carol.cmi
Class DistributorSfsbHome

java.lang.Object
  extended byorg.objectweb.carol.cmi.Distributor
      extended byorg.objectweb.carol.cmi.DistributorSfsbHome

public abstract class DistributorSfsbHome
extends Distributor

Specific Distributor class for the SFSB replication protocol - Handles a backup stub list being a subset of the ServerStubList - Creates the link between the Remote and the Home objects at the create time - Default LB algorithm : RR with local preference

Author:
Benoit Pelletier, Alberto Paz-Jimenez (apaz@no-spam@fi.upm.es), Francisco Perez-Sorrosal (fpsorrosal@no-spam@fi.upm.es)

Constructor Summary
DistributorSfsbHome()
           
 
Method Summary
 StubData choose(java.lang.reflect.Method method, java.lang.Object[] parameters)
          Choose a stub according a rr algorithm with a local preference Default algorithm, can be overriden in a vm
 boolean equivAtBind()
          To be overriden
 boolean equivAtExport()
          To be overriden
protected  java.util.Set getBackupStubs()
          Get the current HA view
 Decision onException(java.lang.reflect.Method method, java.lang.Object[] parameters, StubData sd, java.lang.Exception ex)
          Decison on Exception The application deployer can override this method to make its own choices.
 Decision onReturn(java.lang.reflect.Method method, java.lang.Object[] parameters, StubData sd, java.lang.Object retVal)
          Decision on return The application deployer can override this method to make its own choices.
 
Methods inherited from class org.objectweb.carol.cmi.Distributor
chooseLocalFirst, getCurrentState, getMyServerId, getStubList, preInvoke, read, removeStub, removeStub, toContentsString, toString, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DistributorSfsbHome

public DistributorSfsbHome()
Method Detail

getBackupStubs

protected java.util.Set getBackupStubs()
Get the current HA view

Returns:
set of stubs

equivAtBind

public boolean equivAtBind()
Description copied from class: Distributor
To be overriden

Specified by:
equivAtBind in class Distributor
Returns:
true if the bound object have to be clustered
See Also:
Distributor.equivAtBind()

equivAtExport

public boolean equivAtExport()
Description copied from class: Distributor
To be overriden

Specified by:
equivAtExport in class Distributor
Returns:
true if the export object have to be clustered
See Also:
Distributor.equivAtExport()

choose

public StubData choose(java.lang.reflect.Method method,
                       java.lang.Object[] parameters)
                throws NoServerException
Choose a stub according a rr algorithm with a local preference Default algorithm, can be overriden in a vm

Overrides:
choose in class Distributor
Parameters:
method - called method
parameters - array of parameters passed in
Returns:
chosen stub
Throws:
NoServerException - if no stub available

onException

public Decision onException(java.lang.reflect.Method method,
                            java.lang.Object[] parameters,
                            StubData sd,
                            java.lang.Exception ex)
Decison on Exception The application deployer can override this method to make its own choices.

Overrides:
onException in class Distributor
Parameters:
method - calling method
parameters - parameters of the calling method
sd - stub data
ex - exception
Returns:
decision

onReturn

public Decision onReturn(java.lang.reflect.Method method,
                         java.lang.Object[] parameters,
                         StubData sd,
                         java.lang.Object retVal)
Decision on return The application deployer can override this method to make its own choices.

Overrides:
onReturn in class Distributor
Parameters:
method - calling method
parameters - parameters of the calling method
sd - stub data
retVal - return value
Returns:
decision