tigase.db.beans

## Class MDPoolBeanWithStatistics<S extends Repository,T extends MDPoolConfigBean<S,T>>

- java.lang.Object
- - tigase.db.beans.MDPoolBean<S,T>
  - - tigase.db.beans.MDPoolBeanWithStatistics<S,T>

- All Implemented Interfaces:
    RegistrarBean, RegistrarBeanWithDefaultBeanClass, ComponentStatisticsProvider, StatisticsProviderIfc
  Direct Known Subclasses:
    AuthRepositoryMDImpl, UserRepositoryMDImpl

      public abstract class MDPoolBeanWithStatistics<S extends Repository,T extends MDPoolConfigBean<S,T>>
      extends MDPoolBean<S,T>
      implements ComponentStatisticsProvider

  Class extends MDPoolBean class by adding support for statistics gathering for every managed repository.
  Created by andrzej on 14.12.2016.

- - ### Field Summary

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

      `POOL_CLASS, POOL_SIZE, REPO_CLASS, REPO_URI`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MDPoolBeanWithStatistics(Class<S> repoClazz)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addRepo(String name, S repo)` Method called to add repo instance for domain
    `void` | `everyHour()`
    `void` | `everyMinute()`
    `void` | `everySecond()`
    `S` | `getDefaultRepository()`
    `Collection<String>` | `getDomainsList()`
    `S` | `getRepo(String domain)`
    `void` | `getStatistics(String compName, StatisticsList list)`
    `S` | `removeRepo(String domain)` Method called to remove repo instance for domain
    `Stream<S>` | `repositoriesStream()`
    `void` | `setDefault(S repo)` Method called to set default repo instance.
    `void` | `setStatisticsEnabled(boolean value)`
    `void` | `wrapInProxy(String name, S repo)`

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

      `getConfigClass, getDefaultAlias, getName, register, registerConfigBean, unregister`

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

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

    - ### Methods inherited from interface tigase.stats.ComponentStatisticsProvider

      `belongsTo`

    - ### Methods inherited from interface tigase.kernel.beans.RegistrarBeanWithDefaultBeanClass

      `getDefaultBeanClass`

- - ### Constructor Detail

    - #### MDPoolBeanWithStatistics

          public MDPoolBeanWithStatistics(Class<S> repoClazz)

  - ### Method Detail

    - #### addRepo

          public void addRepo(String name,
                              S repo)

      Description copied from class: `MDPoolBean`
      Method called to add repo instance for domain
      Specified by:
        `addRepo` in class `MDPoolBean<S extends Repository,T extends MDPoolConfigBean<S,T>>`

    - #### removeRepo

          public S removeRepo(String domain)

      Description copied from class: `MDPoolBean`
      Method called to remove repo instance for domain
      Specified by:
        `removeRepo` in class `MDPoolBean<S extends Repository,T extends MDPoolConfigBean<S,T>>`
      Returns:
        removed instance of repo

    - #### getDomainsList

          public Collection<String> getDomainsList()

    - #### getDefaultRepository

          public S getDefaultRepository()

    - #### repositoriesStream

          public Stream<S> repositoriesStream()

    - #### everyHour

          public void everyHour()

      Specified by:
        `everyHour` in interface `ComponentStatisticsProvider`

    - #### everyMinute

          public void everyMinute()

      Specified by:
        `everyMinute` in interface `ComponentStatisticsProvider`

    - #### everySecond

          public void everySecond()

      Specified by:
        `everySecond` in interface `ComponentStatisticsProvider`

    - #### setDefault

          public void setDefault(S repo)

      Description copied from class: `MDPoolBean`
      Method called to set default repo instance.
      Specified by:
        `setDefault` in class `MDPoolBean<S extends Repository,T extends MDPoolConfigBean<S,T>>`
      Parameters:
        `repo` - instance of repo

    - #### getStatistics

          public void getStatistics(String compName,
                                    StatisticsList list)

      Specified by:
        `getStatistics` in interface `StatisticsProviderIfc`

    - #### setStatisticsEnabled

          public void setStatisticsEnabled(boolean value)

    - #### getRepo

          public S getRepo(String domain)

    - #### wrapInProxy

          public void wrapInProxy(String name,
                                  S repo)

Copyright © 2004–2019 "Tigase, Inc.". All rights reserved.