public void setAlgorithm(LoadbalanceAlgorithm algorithm) { if (log.isDebugEnabled()) { log.debug("Load-balance " + this.toString() + " will be using the algorithm " + algorithm.getName() + " for load distribution"); } this.algorithm = algorithm; }
public void setAlgorithm(LoadbalanceAlgorithm algorithm) { if (log.isDebugEnabled()) { log.debug("Load-balance " + this.toString() + " will be using the algorithm " + algorithm.getName() + " for load distribution"); } this.algorithm = algorithm; }
/** * If this endpoint is in inactive state, checks if all immediate child endpoints are still * failed. If so returns false. If at least one child endpoint is in active state, sets this * endpoint's state to active and returns true. As this a sessionless load balancing endpoint * having one active child endpoint is enough to consider this as active. * * @return true if active. false otherwise. */ public boolean readyToSend() { for (Endpoint endpoint : getChildren()) { if (endpoint.readyToSend()) { if (log.isDebugEnabled()) { log.debug("Load-balance " + this.toString() + " has at least one endpoint at ready state"); } return true; } } log.warn("Load-balance " + this.toString() + " has no endpoints at ready state to process message"); return false; }
/** * If this endpoint is in inactive state, checks if all immediate child endpoints are still * failed. If so returns false. If at least one child endpoint is in active state, sets this * endpoint's state to active and returns true. As this a sessionless load balancing endpoint * having one active child endpoint is enough to consider this as active. * * @return true if active. false otherwise. */ public boolean readyToSend() { if (getContext().isState(EndpointContext.ST_OFF)) { return false; } for (Endpoint endpoint : getChildren()) { if (endpoint.readyToSend()) { if (log.isDebugEnabled()) { log.debug("Load-balance " + this.toString() + " has at least one endpoint at ready state"); } return true; } } log.warn("Load-balance " + this.toString() + " has no endpoints at ready state to process message"); return false; }
public void send(MessageContext synCtx) { log.debug("Sending using Load-balance " + toString());
private void sendMessage(MessageContext synCtx) { logSetter(); if (log.isDebugEnabled()) { log.debug("Sending using Load-balance " + toString());