org.wildfly.swarm.config.ejb3.service

## Class DatabaseDataStore<T extends DatabaseDataStore<T>>

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

- All Implemented Interfaces:
    Serializable, Cloneable, Map

      public class DatabaseDataStore<T extends DatabaseDataStore<T>>
      extends HashMap

  An database based store for persistent EJB timers.
  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
    `DatabaseDataStore(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
    `Boolean` | `allowExecution()` If this node is allowed to execute timers.
    `T` | `allowExecution(Boolean value)` If this node is allowed to execute timers.
    `String` | `database()` The type of database that is in use.
    `T` | `database(String value)` The type of database that is in use.
    `String` | `datasourceJndiName()` The datasource that is used to persist the timers
    `T` | `datasourceJndiName(String value)` The datasource that is used to persist the timers
    `String` | `getKey()`
    `String` | `partition()` The partition name.
    `T` | `partition(String value)` The partition name.
    `Integer` | `refreshInterval()` Interval between refreshing the current timer set against the underlying database.
    `T` | `refreshInterval(Integer value)` Interval between refreshing the current timer set against the underlying database.
    `void` | `removePropertyChangeListener(PropertyChangeListener listener)` Removes a property change listener

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

    - #### DatabaseDataStore

          public DatabaseDataStore(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

    - #### allowExecution

          public Boolean allowExecution()

      If this node is allowed to execute timers. If this is false then the timers will be added to the database, and another node may execute them. Note that depending on your refresh interval if you add timers with a very short delay they will not be executed until another node refreshes.

    - #### allowExecution

          public T allowExecution(Boolean value)

      If this node is allowed to execute timers. If this is false then the timers will be added to the database, and another node may execute them. Note that depending on your refresh interval if you add timers with a very short delay they will not be executed until another node refreshes.

    - #### database

          public String database()

      The type of database that is in use. SQL can be customised per database type.

    - #### database

          public T database(String value)

      The type of database that is in use. SQL can be customised per database type.

    - #### datasourceJndiName

          public String datasourceJndiName()

      The datasource that is used to persist the timers

    - #### datasourceJndiName

          public T datasourceJndiName(String value)

      The datasource that is used to persist the timers

    - #### partition

          public String partition()

      The partition name. This should be set to a different value for every node that is sharing a database to prevent the same timer being loaded by multiple noded.

    - #### partition

          public T partition(String value)

      The partition name. This should be set to a different value for every node that is sharing a database to prevent the same timer being loaded by multiple noded.

    - #### refreshInterval

          public Integer refreshInterval()

      Interval between refreshing the current timer set against the underlying database. A low value means timers get picked up more quickly, but increase load on the database.

    - #### refreshInterval

          public T refreshInterval(Integer value)

      Interval between refreshing the current timer set against the underlying database. A low value means timers get picked up more quickly, but increase load on the database.

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