org.wildfly.swarm.config.undertow.configuration.mod_cluster

## Class Balancer<T extends Balancer<T>>

- java.lang.Object
- - java.util.AbstractMap<K,V>
  - - java.util.HashMap
    - - org.wildfly.swarm.config.undertow.configuration.mod_cluster.Balancer<T>

- All Implemented Interfaces:
    Serializable, Cloneable, Map

      public class Balancer<T extends Balancer<T>>
      extends HashMap

  Runtime representation of a mod_cluster balancer
  See Also:
    Serialized Form

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `Balancer.BalancerResources` Child mutators for Balancer

    - ### Nested classes/interfaces inherited from class java.util.AbstractMap

      `AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>`

    - ### Nested classes/interfaces inherited from interface java.util.Map

      `Map.Entry<K,V>`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Balancer(String key)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addPropertyChangeListener(PropertyChangeListener listener)` Adds a property change listener
    `String` | `getKey()`
    `T` | `loadBalancingGroup(LoadBalancingGroup value)` Add the LoadBalancingGroup object to the list of subresources
    `T` | `loadBalancingGroup(LoadBalancingGroupSupplier supplier)` Install a supplied LoadBalancingGroup object to the list of subresources
    `T` | `loadBalancingGroup(String childKey)` Create and configure a LoadBalancingGroup object to the list of subresources
    `T` | `loadBalancingGroup(String childKey, LoadBalancingGroupConsumer consumer)` Create and configure a LoadBalancingGroup object to the list of subresources
    `T` | `loadBalancingGroups(List<LoadBalancingGroup> value)` Add all LoadBalancingGroup objects to this subresource
    `Integer` | `maxAttempts()` The number of attempts to send the request to a backend server
    `T` | `maxAttempts(Integer value)` The number of attempts to send the request to a backend server
    `T` | `node(Node value)` Add the Node object to the list of subresources
    `T` | `node(NodeSupplier supplier)` Install a supplied Node object to the list of subresources
    `T` | `node(String childKey)` Create and configure a Node object to the list of subresources
    `T` | `node(String childKey, NodeConsumer consumer)` Create and configure a Node object to the list of subresources
    `T` | `nodes(List<Node> value)` Add all Node objects to this subresource
    `void` | `removePropertyChangeListener(PropertyChangeListener listener)` Removes a property change listener
    `Boolean` | `stickySession()` If sticky sessions are enabled
    `T` | `stickySession(Boolean value)` If sticky sessions are enabled
    `String` | `stickySessionCookie()` The session cookie name
    `T` | `stickySessionCookie(String value)` The session cookie name
    `Boolean` | `stickySessionForce()` If this is true then an error will be returned if the request cannot be routed to the sticky node, otherwise it will be routed to another node
    `T` | `stickySessionForce(Boolean value)` If this is true then an error will be returned if the request cannot be routed to the sticky node, otherwise it will be routed to another node
    `String` | `stickySessionPath()` The path of the sticky session cookie
    `T` | `stickySessionPath(String value)` The path of the sticky session cookie
    `Boolean` | `stickySessionRemove()` Remove the session cookie if the request cannot be routed to the correct host
    `T` | `stickySessionRemove(Boolean value)` Remove the session cookie if the request cannot be routed to the correct host
    `Balancer.BalancerResources` | `subresources()`
    `Integer` | `waitWorker()` The number of seconds to wait for an available worker
    `T` | `waitWorker(Integer value)` The number of seconds to wait for an available worker

    - ### Methods inherited from class java.util.HashMap

      `clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values`

    - ### Methods inherited from class java.util.AbstractMap

      `equals, hashCode, toString`

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface java.util.Map

      `equals, hashCode`

- - ### Constructor Detail

    - #### Balancer

          public Balancer(String key)

  - ### Method Detail

    - #### getKey

          public String getKey()

    - #### addPropertyChangeListener

          public void addPropertyChangeListener(PropertyChangeListener listener)

      Adds a property change listener

    - #### removePropertyChangeListener

          public void removePropertyChangeListener(PropertyChangeListener listener)

      Removes a property change listener

    - #### subresources

          public Balancer.BalancerResources subresources()

    - #### nodes

          public T nodes(List<Node> value)

      Add all Node objects to this subresource
      Parameters:
        `value` - List of Node objects.
      Returns:
        this

    - #### node

          public T node(Node value)

      Add the Node object to the list of subresources
      Parameters:
        `value` - The Node to add
      Returns:
        this

    - #### node

          public T node(String childKey,
                        NodeConsumer consumer)

      Create and configure a Node object to the list of subresources
      Parameters:
        `key` - The key for the Node resource
        `config` - The NodeConsumer to use
      Returns:
        this

    - #### node

          public T node(String childKey)

      Create and configure a Node object to the list of subresources
      Parameters:
        `key` - The key for the Node resource
      Returns:
        this

    - #### node

          public T node(NodeSupplier supplier)

      Install a supplied Node object to the list of subresources

    - #### loadBalancingGroups

          public T loadBalancingGroups(List<LoadBalancingGroup> value)

      Add all LoadBalancingGroup objects to this subresource
      Parameters:
        `value` - List of LoadBalancingGroup objects.
      Returns:
        this

    - #### loadBalancingGroup

          public T loadBalancingGroup(LoadBalancingGroup value)

      Add the LoadBalancingGroup object to the list of subresources
      Parameters:
        `value` - The LoadBalancingGroup to add
      Returns:
        this

    - #### loadBalancingGroup

          public T loadBalancingGroup(String childKey,
                                      LoadBalancingGroupConsumer consumer)

      Create and configure a LoadBalancingGroup object to the list of subresources
      Parameters:
        `key` - The key for the LoadBalancingGroup resource
        `config` - The LoadBalancingGroupConsumer to use
      Returns:
        this

    - #### loadBalancingGroup

          public T loadBalancingGroup(String childKey)

      Create and configure a LoadBalancingGroup object to the list of subresources
      Parameters:
        `key` - The key for the LoadBalancingGroup resource
      Returns:
        this

    - #### loadBalancingGroup

          public T loadBalancingGroup(LoadBalancingGroupSupplier supplier)

      Install a supplied LoadBalancingGroup object to the list of subresources

    - #### maxAttempts

          public Integer maxAttempts()

      The number of attempts to send the request to a backend server

    - #### maxAttempts

          public T maxAttempts(Integer value)

      The number of attempts to send the request to a backend server

    - #### stickySession

          public Boolean stickySession()

      If sticky sessions are enabled

    - #### stickySession

          public T stickySession(Boolean value)

      If sticky sessions are enabled

    - #### stickySessionCookie

          public String stickySessionCookie()

      The session cookie name

    - #### stickySessionCookie

          public T stickySessionCookie(String value)

      The session cookie name

    - #### stickySessionForce

          public Boolean stickySessionForce()

      If this is true then an error will be returned if the request cannot be routed to the sticky node, otherwise it will be routed to another node

    - #### stickySessionForce

          public T stickySessionForce(Boolean value)

      If this is true then an error will be returned if the request cannot be routed to the sticky node, otherwise it will be routed to another node

    - #### stickySessionPath

          public String stickySessionPath()

      The path of the sticky session cookie

    - #### stickySessionPath

          public T stickySessionPath(String value)

      The path of the sticky session cookie

    - #### stickySessionRemove

          public Boolean stickySessionRemove()

      Remove the session cookie if the request cannot be routed to the correct host

    - #### stickySessionRemove

          public T stickySessionRemove(Boolean value)

      Remove the session cookie if the request cannot be routed to the correct host

    - #### waitWorker

          public Integer waitWorker()

      The number of seconds to wait for an available worker

    - #### waitWorker

          public T waitWorker(Integer value)

      The number of seconds to wait for an available worker

Copyright © 2017 JBoss by Red Hat. All rights reserved.