|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.carol.cmi.Distributor
org.objectweb.carol.cmi.DistributorHome
public abstract class DistributorHome
Specific Distributor class for the Home interface load balancing and fail-over logic - default LB algorithm : -> local pref and round robin - default fail-over algorithm : -> retry on ConnectException or ConnectIOException or NoSuchObjectException
Constructor Summary | |
---|---|
DistributorHome()
|
Method Summary | |
---|---|
StubData |
choose(java.lang.reflect.Method method,
java.lang.Object[] parameters)
choose a stub according to the load balancing algorithm - first local preference - and then round robin The application can override this method |
boolean |
equivAtBind()
To be overriden |
boolean |
equivAtExport()
To be overriden |
Decision |
onException(java.lang.reflect.Method method,
java.lang.Object[] parameters,
StubData sd,
java.lang.Exception ex)
Decision on Exception : - retry on ConnectException or ConnectIOException or NoSuchObjectException 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 For the SSB, the create method returns a ClusterStub containing a list of Remote stubs (singleton) With the preference local algorithm implemented by the choose method, the local remote stub is also taken in priority Below, the optimization consists not to return a Remote stubs list in this case but just the local Remote Stub. |
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 |
---|
public DistributorHome()
Method Detail |
---|
public boolean equivAtBind()
Distributor
equivAtBind
in class Distributor
The home stub associated with the jndi name has to be replicated at the bind() time
public boolean equivAtExport()
Distributor
equivAtExport
in class Distributor
Distributor.equivAtExport()
public StubData choose(java.lang.reflect.Method method, java.lang.Object[] parameters) throws NoServerException
choose
in class Distributor
method
- called methodparameters
- method's parameters list
NoServerException
- if no more stub availablepublic Decision onReturn(java.lang.reflect.Method method, java.lang.Object[] parameters, StubData sd, java.lang.Object retVal)
onReturn
in class Distributor
method
- calling methodparameters
- parameters of the calling methodsd
- stub dataretVal
- return value
public Decision onException(java.lang.reflect.Method method, java.lang.Object[] parameters, StubData sd, java.lang.Exception ex)
onException
in class Distributor
method
- calling methodparameters
- parameters of the calling methodsd
- stub dataex
- exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |