|
xmlBlaster 2.2.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xmlBlaster.engine.cluster.simpledomain.RoundRobin
public final class RoundRobin
Implements dummy load balancing for xmlBlaster using round robin approach.
Field Summary | |
---|---|
private int |
counter
|
private ServerScope |
glob
|
private static java.util.logging.Logger |
log
|
private java.lang.String |
ME
|
Constructor Summary | |
---|---|
RoundRobin()
|
Method Summary | |
---|---|
NodeMasterInfo |
getClusterNode(java.util.Set nodeMasterInfoSet,
java.lang.String keyOidForLogging)
We determine which xmlBlaster node to choose with a simple counter. |
java.lang.String |
getName()
Get a human readable name of this filter implementation |
java.lang.String |
getType()
Return plugin type for Plugin loader |
java.lang.String |
getVersion()
Return plugin version for Plugin loader |
void |
init(Global glob,
PluginInfo pluginInfo)
This method is called by the PluginManager (enforced by I_Plugin). |
void |
initialize(ServerScope glob,
ClusterManager clusterManager)
This is called after instantiation of the plugin |
void |
shutdown()
Cleans up the resource. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.lang.String ME
private ServerScope glob
private static java.util.logging.Logger log
private int counter
Constructor Detail |
---|
public RoundRobin()
Method Detail |
---|
public void initialize(ServerScope glob, ClusterManager clusterManager)
initialize
in interface I_LoadBalancer
glob
- The Global handle of this xmlBlaster server instance.clusterManager
- My managerpublic void init(Global glob, PluginInfo pluginInfo)
init
in interface I_Plugin
I_Plugin.init(org.xmlBlaster.util.Global,org.xmlBlaster.util.plugin.PluginInfo)
public java.lang.String getType()
getType
in interface I_Plugin
public java.lang.String getVersion()
getVersion
in interface I_Plugin
public java.lang.String getName()
public NodeMasterInfo getClusterNode(java.util.Set nodeMasterInfoSet, java.lang.String keyOidForLogging) throws XmlBlasterException
getClusterNode
in interface I_LoadBalancer
nodeMasterInfoSet
- A set containing NodeMasterInfo objects, the possible xmlBlaster nodes.
Is never null, but may have a size of 0.keyOidForLogging
- A nice string for logging the context
XmlBlasterException
I_LoadBalancer.getClusterNode(java.util.Set, String)
public void shutdown() throws XmlBlasterException
I_Plugin
shutdown
in interface I_Plugin
XmlBlasterException
- if an exception occurs. The exception is
handled by the RunLevelManager depending on how the plugin has been
configured with the action:
<action do='STOP' onShutdownRunlevel='2' sequence='5'
onFail='resource.configuration.pluginFailed'>
If onFail is defined to something, the RunLevelManager will stop.
|
xmlBlaster 2.2.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |