ch.elca.el4j.services.remoting.protocol.loadbalancing.policy
Class RandomPolicy
java.lang.Object
ch.elca.el4j.services.remoting.protocol.loadbalancing.policy.AbstractPolicy
ch.elca.el4j.services.remoting.protocol.loadbalancing.policy.RandomPolicy
public class RandomPolicy
- extends AbstractPolicy
Chooses the protocol according to a random policy. Protocols for whom a
failure has been notified, are removed.
- Author:
- Stefan Pleisch (SPL)
- File-location:
- RandomPolicy
- Last check-in date:
- 2009-08-04 15:35:01 +0200 (Di, 04. Aug 2009) by swismer for revision 3883
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RandomPolicy
public RandomPolicy()
getNextProtocol
public AbstractRemotingProtocol getNextProtocol()
throws NoProtocolAvailableRTException
- Note that protocol comparison must be done using "=="!
- Specified by:
getNextProtocol
in class AbstractPolicy
- Returns:
- The next protocol to be used.
- Throws:
NoProtocolAvailableRTException
- If no protocol is available any more
notifyFailure
public void notifyFailure(AbstractRemotingProtocol protocol)
- This method is called if the use of one of the protocols has failed.
Protocol comparison must be done using "=="!
- Overrides:
notifyFailure
in class AbstractPolicy
- Parameters:
protocol
- The protocol that has lead to a failure.
Copyright © 2005-2011 ELCA. All Rights Reserved.