org.wildfly.swarm.config.singleton

## Class SingletonPolicy<T extends SingletonPolicy<T>>

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

- All Implemented Interfaces:
    Serializable, Cloneable, Map

      public class SingletonPolicy<T extends SingletonPolicy<T>>
      extends HashMap

  A singleton policy
  See Also:
    Serialized Form

- - ### Nested Class Summary

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

    - ### 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
    `SingletonPolicy(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` | `cache()` The cache backing the singleton policy's singleton service
    `T` | `cache(String value)` The cache backing the singleton policy's singleton service
    `String` | `cacheContainer()` The cache container backing the singleton policy's singleton service
    `T` | `cacheContainer(String value)` The cache container backing the singleton policy's singleton service
    `String` | `getKey()`
    `Integer` | `quorum()` The minimum number of nodes required before this singleton service will start
    `T` | `quorum(Integer value)` The minimum number of nodes required before this singleton service will start
    `T` | `randomElectionPolicy()` A random election policy
    `T` | `randomElectionPolicy(RandomElectionPolicy value)` A random election policy
    `T` | `randomElectionPolicy(RandomElectionPolicyConsumer consumer)` A random election policy
    `T` | `randomElectionPolicy(RandomElectionPolicySupplier supplier)` A random election policy
    `void` | `removePropertyChangeListener(PropertyChangeListener listener)` Removes a property change listener
    `T` | `simpleElectionPolicy()` A simple election policy
    `T` | `simpleElectionPolicy(SimpleElectionPolicy value)` A simple election policy
    `T` | `simpleElectionPolicy(SimpleElectionPolicyConsumer consumer)` A simple election policy
    `T` | `simpleElectionPolicy(SimpleElectionPolicySupplier supplier)` A simple election policy
    `SingletonPolicy.SingletonPolicyResources` | `subresources()`

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

    - #### SingletonPolicy

          public SingletonPolicy(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 SingletonPolicy.SingletonPolicyResources subresources()

    - #### randomElectionPolicy

          public T randomElectionPolicy(RandomElectionPolicy value)

      A random election policy

    - #### randomElectionPolicy

          public T randomElectionPolicy(RandomElectionPolicyConsumer consumer)

      A random election policy

    - #### randomElectionPolicy

          public T randomElectionPolicy()

      A random election policy

    - #### randomElectionPolicy

          public T randomElectionPolicy(RandomElectionPolicySupplier supplier)

      A random election policy

    - #### simpleElectionPolicy

          public T simpleElectionPolicy(SimpleElectionPolicy value)

      A simple election policy

    - #### simpleElectionPolicy

          public T simpleElectionPolicy(SimpleElectionPolicyConsumer consumer)

      A simple election policy

    - #### simpleElectionPolicy

          public T simpleElectionPolicy()

      A simple election policy

    - #### simpleElectionPolicy

          public T simpleElectionPolicy(SimpleElectionPolicySupplier supplier)

      A simple election policy

    - #### cache

          public String cache()

      The cache backing the singleton policy's singleton service

    - #### cache

          public T cache(String value)

      The cache backing the singleton policy's singleton service

    - #### cacheContainer

          public String cacheContainer()

      The cache container backing the singleton policy's singleton service

    - #### cacheContainer

          public T cacheContainer(String value)

      The cache container backing the singleton policy's singleton service

    - #### quorum

          public Integer quorum()

      The minimum number of nodes required before this singleton service will start

    - #### quorum

          public T quorum(Integer value)

      The minimum number of nodes required before this singleton service will start

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