## Provided Capabilities (1)

Name | Dynamic | Other provider points
--- | --- | ---
org.wildfly.clustering.singleton-policy.election | true | /subsystem=singleton/singleton-policy=*/election-policy=simple

## Attributes (2)

- name-preferences - The list of preferred node names

  Type | LIST
  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
  Stability Level | default
  Raw DMR model |
      {
          "type" : {
              "TYPE_MODEL_VALUE" : "LIST"
          },
          "description" : "The list of preferred node names",
          "expressions-allowed" : true,
          "required" : false,
          "nillable" : true,
          "alternatives" : ["socket-binding-preferences"],
          "min-length" : 0,
          "max-length" : 2147483647,
          "stability" : "default",
          "value-type" : {
              "TYPE_MODEL_VALUE" : "STRING"
          },
          "access-type" : "read-write",
          "storage" : "configuration",
          "restart-required" : "resource-services",
          "capability-reference" : null
      }

- socket-binding-preferences - The list of preferred node socket bindings

  Type | LIST
  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" : "LIST"
          },
          "description" : "The list of preferred node socket bindings",
          "expressions-allowed" : false,
          "required" : false,
          "nillable" : true,
          "alternatives" : ["name-preferences"],
          "capability-reference" : "org.wildfly.network.outbound-socket-binding",
          "min-length" : 0,
          "max-length" : 2147483647,
          "stability" : "default",
          "value-type" : {
              "TYPE_MODEL_VALUE" : "STRING"
          },
          "access-type" : "read-write",
          "storage" : "configuration",
          "restart-required" : "resource-services"
      }

## Operations (2)

- add - A random election policy

  Request Parameter | Type | Required | Expressions Allowed | Default value | Description
  --- | --- | --- | --- | --- | ---
  name-preferences | LIST | false | true |  | The list of preferred node names
  socket-binding-preferences | LIST | false | false |  | The list of preferred node socket bindings

  Raw DMR model |
      {
          "operation-name" : "add",
          "description" : "A random election policy",
          "request-properties" : {
              "name-preferences" : {
                  "type" : {
                      "TYPE_MODEL_VALUE" : "LIST"
                  },
                  "description" : "The list of preferred node names",
                  "expressions-allowed" : true,
                  "required" : false,
                  "nillable" : true,
                  "alternatives" : ["socket-binding-preferences"],
                  "min-length" : 0,
                  "max-length" : 2147483647,
                  "stability" : "default",
                  "value-type" : {
                      "TYPE_MODEL_VALUE" : "STRING"
                  }
              },
              "socket-binding-preferences" : {
                  "type" : {
                      "TYPE_MODEL_VALUE" : "LIST"
                  },
                  "description" : "The list of preferred node socket bindings",
                  "expressions-allowed" : false,
                  "required" : false,
                  "nillable" : true,
                  "alternatives" : ["name-preferences"],
                  "capability-reference" : "org.wildfly.network.outbound-socket-binding",
                  "min-length" : 0,
                  "max-length" : 2147483647,
                  "stability" : "default",
                  "value-type" : {
                      "TYPE_MODEL_VALUE" : "STRING"
                  }
              }
          },
          "reply-properties" : {},
          "stability" : "default",
          "read-only" : false,
          "runtime-only" : false
      }

- remove - Removes a random election policy

  Raw DMR model |
      {
          "operation-name" : "remove",
          "description" : "Removes a random election 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.election-policy.random

      <feature spec="subsystem.singleton.singleton-policy.election-policy.random">
        <param name="singleton-policy" value="{resource name}"/>
        <param name="name-preferences" value="{value}"/>
        <param name="socket-binding-preferences" value="{value}"/>
      <feature/>