org.wildfly.swarm.config.singleton.singleton_policy

## Class SimpleElectionPolicy<T extends SimpleElectionPolicy<T>>

- java.lang.Object
- - java.util.AbstractMap<K,V>
  - - java.util.HashMap
    - - org.wildfly.swarm.config.singleton.singleton_policy.SimpleElectionPolicy<T>

- All Implemented Interfaces:
    Serializable, Cloneable, Map

      public class SimpleElectionPolicy<T extends SimpleElectionPolicy<T>>
      extends HashMap

  A simple election policy
  See Also:
    Serialized Form

- - ### Nested Class Summary

    - ### 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
    `SimpleElectionPolicy()`

  - ### 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` | `namePreference(String value)` The list of preferred node names
    `List<String>` | `namePreferences()` The list of preferred node names
    `T` | `namePreferences(List<String> value)` The list of preferred node names
    `T` | `namePreferences(String... args)` The list of preferred node names
    `Integer` | `position()` The position in the membership list from which the singleton master will be chosen
    `T` | `position(Integer value)` The position in the membership list from which the singleton master will be chosen
    `void` | `removePropertyChangeListener(PropertyChangeListener listener)` Removes a property change listener
    `T` | `socketBindingPreference(String value)` The list of preferred node socket bindings
    `List<String>` | `socketBindingPreferences()` The list of preferred node socket bindings
    `T` | `socketBindingPreferences(List<String> value)` The list of preferred node socket bindings
    `T` | `socketBindingPreferences(String... args)` The list of preferred node socket bindings

    - ### 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

    - #### SimpleElectionPolicy

          public SimpleElectionPolicy()

  - ### 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

    - #### namePreferences

          public List<String> namePreferences()

      The list of preferred node names

    - #### namePreferences

          public T namePreferences(List<String> value)

      The list of preferred node names

    - #### namePreference

          public T namePreference(String value)

      The list of preferred node names

    - #### namePreferences

          public T namePreferences(String... args)

      The list of preferred node names

    - #### position

          public Integer position()

      The position in the membership list from which the singleton master will be chosen

    - #### position

          public T position(Integer value)

      The position in the membership list from which the singleton master will be chosen

    - #### socketBindingPreferences

          public List<String> socketBindingPreferences()

      The list of preferred node socket bindings

    - #### socketBindingPreferences

          public T socketBindingPreferences(List<String> value)

      The list of preferred node socket bindings

    - #### socketBindingPreference

          public T socketBindingPreference(String value)

      The list of preferred node socket bindings

    - #### socketBindingPreferences

          public T socketBindingPreferences(String... args)

      The list of preferred node socket bindings

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