## Children (3)

- deployment
- election-policy
  - random
  - simple
- service

## Provided Capabilities (1)

Name | Dynamic | Other provider points
--- | --- | ---
org.wildfly.clustering.singleton.service-target-factory | true | none

## Attributes (3)

- cache - The cache backing the singleton policy's singleton service. If undefined, the default cache of the specified cache-container is used.

  Type | STRING
  Is the attribute nillable? | true
  Where is the attribute stored? | configuration
  Access Type | read-write
  Is restarted required? | resource-services
  Stability Level | default
  Raw DMR model |
      {
          "type" : {
              "TYPE_MODEL_VALUE" : "STRING"
          },
          "description" : "The cache backing the singleton policy's singleton service. If undefined, the default cache of the specified cache-container is used.",
          "expressions-allowed" : false,
          "required" : false,
          "nillable" : true,
          "capability-reference" : "org.wildfly.clustering.infinispan.cache-configuration",
          "capability-reference-pattern-elements" : [
              "cache-container",
              "cache"
          ],
          "min-length" : 1,
          "max-length" : 2147483647,
          "stability" : "default",
          "access-type" : "read-write",
          "storage" : "configuration",
          "restart-required" : "resource-services"
      }

- cache-container - The cache container backing the singleton policy's singleton service

  Type | STRING
  Where is the attribute stored? | configuration
  Access Type | read-write
  Is restarted required? | resource-services
  Stability Level | default
  Raw DMR model |
      {
          "type" : {
              "TYPE_MODEL_VALUE" : "STRING"
          },
          "description" : "The cache container backing the singleton policy's singleton service",
          "expressions-allowed" : false,
          "required" : true,
          "nillable" : false,
          "capability-reference" : "org.wildfly.clustering.infinispan.default-cache-configuration",
          "min-length" : 1,
          "max-length" : 2147483647,
          "stability" : "default",
          "access-type" : "read-write",
          "storage" : "configuration",
          "restart-required" : "resource-services"
      }

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

  Type | INT
  Default Value | 1
  Is the attribute nillable? | true
  Does the attribute allow expression? | true
  Where is the attribute stored? | configuration
  Access Type | read-write
  Is restarted required? | resource-services
  Min | 1
  Max | 2147483647
  Stability Level | default
  Raw DMR model |
      {
          "type" : {
              "TYPE_MODEL_VALUE" : "INT"
          },
          "description" : "The minimum number of nodes required before this singleton service will start",
          "expressions-allowed" : true,
          "required" : false,
          "nillable" : true,
          "default" : 1,
          "min" : 1,
          "max" : 2147483647,
          "stability" : "default",
          "access-type" : "read-write",
          "storage" : "configuration",
          "restart-required" : "resource-services",
          "capability-reference" : null
      }

## Operations (2)

- add - Add a singleton policy

  Request Parameter | Type | Required | Expressions Allowed | Default value | Description
  --- | --- | --- | --- | --- | ---
  cache | STRING | false | false |  | The cache backing the singleton policy's singleton service. If undefined, the default cache of the specified cache-container is used.
  cache-container | STRING | true | false |  | The cache container backing the singleton policy's singleton service
  quorum | INT | false | true | 1 | The minimum number of nodes required before this singleton service will start

  Raw DMR model |
      {
          "operation-name" : "add",
          "description" : "Add a singleton policy",
          "request-properties" : {
              "cache" : {
                  "type" : {
                      "TYPE_MODEL_VALUE" : "STRING"
                  },
                  "description" : "The cache backing the singleton policy's singleton service. If undefined, the default cache of the specified cache-container is used.",
                  "expressions-allowed" : false,
                  "required" : false,
                  "nillable" : true,
                  "capability-reference" : "org.wildfly.clustering.infinispan.cache-configuration",
                  "capability-reference-pattern-elements" : [
                      "cache-container",
                      "cache"
                  ],
                  "min-length" : 1,
                  "max-length" : 2147483647,
                  "stability" : "default"
              },
              "cache-container" : {
                  "type" : {
                      "TYPE_MODEL_VALUE" : "STRING"
                  },
                  "description" : "The cache container backing the singleton policy's singleton service",
                  "expressions-allowed" : false,
                  "required" : true,
                  "nillable" : false,
                  "capability-reference" : "org.wildfly.clustering.infinispan.default-cache-configuration",
                  "min-length" : 1,
                  "max-length" : 2147483647,
                  "stability" : "default"
              },
              "quorum" : {
                  "type" : {
                      "TYPE_MODEL_VALUE" : "INT"
                  },
                  "description" : "The minimum number of nodes required before this singleton service will start",
                  "expressions-allowed" : true,
                  "required" : false,
                  "nillable" : true,
                  "default" : 1,
                  "min" : 1,
                  "max" : 2147483647,
                  "stability" : "default"
              }
          },
          "reply-properties" : {},
          "stability" : "default",
          "read-only" : false,
          "runtime-only" : false
      }

- remove - Remove a singleton policy

  Raw DMR model |
      {
          "operation-name" : "remove",
          "description" : "Remove a singleton policy",
          "request-properties" : {},
          "reply-properties" : {},
          "stability" : "default",
          "read-only" : false,
          "restart-required" : "resource-services",
          "runtime-only" : false
      }

## Galleon Features

Galleon features are to be used when creating Galleon feature-packs.

- subsystem.singleton.singleton-policy

      <feature spec="subsystem.singleton.singleton-policy">
        <param name="singleton-policy" value="{resource name}"/>
        <param name="cache" value="{value}"/>
        <param name="cache-container" value="{value}"/>
        <param name="quorum" value="{value}"/>
      <feature/>