org.wildfly.swarm.config

## Class Singleton<T extends Singleton<T>>

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

- All Implemented Interfaces:
    Serializable, Cloneable, Map

      public class Singleton<T extends Singleton<T>>
      extends HashMap

  The configuration of the singleton subsystem
  See Also:
    Serialized Form

- - ### Nested Class Summary

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

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

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addPropertyChangeListener(PropertyChangeListener listener)` Adds a property change listener
    `String` | `attributeDefault()` The default singleton policy
    `T` | `attributeDefault(String value)` The default singleton policy
    `String` | `getKey()`
    `void` | `removePropertyChangeListener(PropertyChangeListener listener)` Removes a property change listener
    `T` | `singletonPolicies(List<SingletonPolicy> value)` Add all SingletonPolicy objects to this subresource
    `T` | `singletonPolicy(SingletonPolicy value)` Add the SingletonPolicy object to the list of subresources
    `T` | `singletonPolicy(SingletonPolicySupplier supplier)` Install a supplied SingletonPolicy object to the list of subresources
    `T` | `singletonPolicy(String childKey)` Create and configure a SingletonPolicy object to the list of subresources
    `T` | `singletonPolicy(String childKey, SingletonPolicyConsumer consumer)` Create and configure a SingletonPolicy object to the list of subresources
    `Singleton.SingletonResources` | `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

    - #### Singleton

          public Singleton()

  - ### 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 Singleton.SingletonResources subresources()

    - #### singletonPolicies

          public T singletonPolicies(List<SingletonPolicy> value)

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

    - #### singletonPolicy

          public T singletonPolicy(SingletonPolicy value)

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

    - #### singletonPolicy

          public T singletonPolicy(String childKey,
                                   SingletonPolicyConsumer consumer)

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

    - #### singletonPolicy

          public T singletonPolicy(String childKey)

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

    - #### singletonPolicy

          public T singletonPolicy(SingletonPolicySupplier supplier)

      Install a supplied SingletonPolicy object to the list of subresources

    - #### attributeDefault

          public String attributeDefault()

      The default singleton policy

    - #### attributeDefault

          public T attributeDefault(String value)

      The default singleton policy

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