org.wildfly.swarm.config.ejb3.service

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

- java.lang.Object
- - org.wildfly.swarm.config.ejb3.service.DatabaseDataStore<T>

-     public class DatabaseDataStore<T extends DatabaseDataStore<T>>
      extends Object

  An database based store for persistent EJB timers.

- - ### 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.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

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