jrunx.cluster
Class BroadcastAlgorithm
java.lang.Object
|
+--jrunx.cluster.ClusterAlgorithm
|
+--jrunx.cluster.RoundRobinAlgorithm
|
+--jrunx.cluster.StickyRoundRobinAlgorithm
|
+--jrunx.cluster.BroadcastAlgorithm
- All Implemented Interfaces:
- ClusterConstants, java.io.Serializable
- public class BroadcastAlgorithm
- extends StickyRoundRobinAlgorithm
A cluster algorithm that re-invokes certain methods -- usually "write" methods, or setters --
methods on every service instance in the cluster. For most methods, it performs the same logic
as StickyRoundRobinAlgorithm, which is its super class. Only specified methods are re-invoked
on all stubs.
For example, The JNDI ContextManager is a ClusterableService that uses this algorithm to ensure
that bind, rebind, and unbind operations are invoked on every JNDI service in the cluster.
Any other method -- such as lookup -- is performed on only one stub, chosen
at random using the super class StickyRoundRobinAlgorithm logic.
By default, all known services are broadcasted to. You can specify specific servers to broadcast to,
however, when adding broadcasted methods.
- Author:
- PS Neville
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BroadcastAlgorithm
public BroadcastAlgorithm()
addBroadcastMethod
public void addBroadcastMethod(java.lang.String method)
addBroadcastMethod
public void addBroadcastMethod(java.lang.String method,
java.util.Collection servers)
invokeService
protected Invocation invokeService(Invocation inv,
ClusterableService svc)
throws java.lang.Throwable
- Overrides:
invokeService in class ClusterAlgorithm
Copyright � 2002 Macromedia Corporation. All Rights Reserved.