java.lang .Object org.continuent.sequoia.controller.loadbalancer.policies .WaitForCompletionPolicy WaitForCompletionPolicy public class WaitForCompletionPolicy (Code) Defines the policy to adopt before returning a result to the client.
author: Emmanuel Cecchet version: 1.0
Field Summary final public static int ALL Wait for all nodes to complete the request before returning the result.final public static int FIRST Return as soon as one node has completed the request.final public static int MAJORITY Return as soon as a majority (n/2+1) of nodes has completed the request.
Constructor Summary public WaitForCompletionPolicy (int policy, boolean enforceTableLocking, long deadlockTimeoutInMs)
ALL final public static int ALL (Code) Wait for all nodes to complete the request before returning the result.
FIRST final public static int FIRST (Code) Return as soon as one node has completed the request.
MAJORITY final public static int MAJORITY (Code) Return as soon as a majority (n/2+1) of nodes has completed the request.
WaitForCompletionPolicy public WaitForCompletionPolicy(int policy, boolean enforceTableLocking, long deadlockTimeoutInMs)(Code) Creates a new WaitForCompletionPolicy
object
Parameters: policy - the default policy to useParameters: enforceTableLocking - true if strict table based locking must beenforcedParameters: deadlockTimeoutInMs - deadlock detection timeout in ms
getDeadlockTimeoutInMs final public long getDeadlockTimeoutInMs() (Code) Returns the deadlockTimeoutInMs value.
Returns the deadlockTimeoutInMs.
getInformation public String getInformation()(Code) Gives information about the current policy.
a String
value
getPolicy public int getPolicy()(Code) Returns the policy.
an int
value
getXml public String getXml()(Code) Returns this wait policy in xml format.
xml formatted string
isEnforceTableLocking public boolean isEnforceTableLocking()(Code) Returns the enforceTableLocking value.
Returns the enforceTableLocking.
setDeadlockTimeoutInMs final public void setDeadlockTimeoutInMs(long deadlockTimeoutInMs) (Code) Sets the deadlockTimeoutInMs value.
Parameters: deadlockTimeoutInMs - The deadlockTimeoutInMs to set.
setPolicy public void setPolicy(int policy)(Code) Sets the policy.
Parameters: policy - the policy to set