Package tigase.db.beans

## Class DataSourceBean.DataSourceMDConfigBean

- java.lang.Object
- - tigase.db.beans.MDPoolConfigBean<DataSource,​DataSourceBean.DataSourceMDConfigBean>
  - - tigase.db.beans.DataSourceBean.DataSourceMDConfigBean

- All Implemented Interfaces:
    `ConfigurationChangedAware`, `Initializable`, `RegistrarBean`, `UnregisterAware`
  Enclosing class:
    DataSourceBean

      public static class DataSourceBean.DataSourceMDConfigBean
      extends MDPoolConfigBean<DataSource,​DataSourceBean.DataSourceMDConfigBean>
      implements UnregisterAware

- - ### Field Summary

    - ### Fields inherited from class tigase.db.beans.MDPoolConfigBean

      `cls, mdPool, name, poolCls, poolSize, uri`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `DataSourceMDConfigBean()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `beforeUnregister()` | Method called before bean unregister.
    `protected java.lang.Class<? extends DataSource>` | `getRepositoryIfc()` | Get interface to which all instances in this pool must conform.
    `protected java.lang.String` | `getRepositoryPoolClassName()` | Finds and retrieves repository pool class name for data source defined in this config bean. * Name of a pool class will be retrieved from `poolCls` field or looked for instances of `DataSourcePool` class annotated with `Repository.Meta` which supported uri matches (regexp) of data source URI.
    `void` | `initialize()` | Method will be called, when bean will be created, configured and ready to use.
    `protected void` | `initRepository​(DataSource repo)` | Initializes instances of provided data source.
    `void` | `setWatchdogFrequency​(java.time.Duration watchdogFrequency)` |

    - ### Methods inherited from class tigase.db.beans.MDPoolConfigBean

      `beanConfigurationChanged, getRepository, getRepositoryClassName, getUri, register, setInstances, setMdPool, setRepository, unloadOldBeans, unregister`

    - ### Methods inherited from class java.lang.Object

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

- - ### Constructor Detail

    - #### DataSourceMDConfigBean

          public DataSourceMDConfigBean()

  - ### Method Detail

    - #### setWatchdogFrequency

          public void setWatchdogFrequency​(java.time.Duration watchdogFrequency)

    - #### initialize

          public void initialize()

      Description copied from interface: `Initializable`
      Method will be called, when bean will be created, configured and ready to use.
      Specified by:
        `initialize` in interface `Initializable`
      Overrides:
        `initialize` in class `MDPoolConfigBean<DataSource,​DataSourceBean.DataSourceMDConfigBean>`

    - #### beforeUnregister

          public void beforeUnregister()

      Description copied from interface: `UnregisterAware`
      Method called before bean unregister.
      Specified by:
        `beforeUnregister` in interface `UnregisterAware`

    - #### getRepositoryIfc

          protected java.lang.Class<? extends DataSource> getRepositoryIfc()

      Get interface to which all instances in this pool must conform.
      Specified by:
        `getRepositoryIfc` in class `MDPoolConfigBean<DataSource,​DataSourceBean.DataSourceMDConfigBean>`
      Returns:
        interface `

    - #### getRepositoryPoolClassName

          protected java.lang.String getRepositoryPoolClassName()
                                                         throws DBInitException

      Finds and retrieves repository pool class name for data source defined in this config bean. *
      Name of a pool class will be retrieved from `poolCls` field or looked for instances of `DataSourcePool` class annotated with `Repository.Meta` which supported uri matches (regexp) of data source URI.
      Specified by:
        `getRepositoryPoolClassName` in class `MDPoolConfigBean<DataSource,​DataSourceBean.DataSourceMDConfigBean>`
      Returns:
        name of a class
      Throws:
        `DBInitException`

    - #### initRepository

          protected void initRepository​(DataSource repo)
                                 throws RepositoryException

      Initializes instances of provided data source.
      Specified by:
        `initRepository` in class `MDPoolConfigBean<DataSource,​DataSourceBean.DataSourceMDConfigBean>`
      Parameters:
        `repo` - instance of data source
      Throws:
        `RepositoryException`