tigase.db.beans

## Class MDRepositoryBeanWithStatistics<T extends DataSourceAware>

- java.lang.Object
- - tigase.db.beans.MDRepositoryBean<T>
  - - tigase.db.beans.MDRepositoryBeanWithStatistics<T>

- All Implemented Interfaces:
    Initializable, RegistrarBean, RegistrarBeanWithDefaultBeanClass, UnregisterAware, ComponentStatisticsProvider, StatisticsProviderIfc
  Direct Known Subclasses:
    CounterDataLoggerRepoBean, MsgBroadcastRepository.MsgBroadcastRepositoryBean, MsgRepository.MsgRepositoryMDBean, RepoPool, SeeOtherHostDualIP.DualIPRepositoryWrapper

      public abstract class MDRepositoryBeanWithStatistics<T extends DataSourceAware>
      extends MDRepositoryBean<T>
      implements ComponentStatisticsProvider

  Extended version of MDRepositoryBean class with support for statistics gathering.
  Created by andrzej on 15.12.2016.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class tigase.db.beans.MDRepositoryBean

      `MDRepositoryBean.MDRepositoryConfigBean<A extends DataSourceAware>, MDRepositoryBean.SelectorType`

  - ### Field Summary

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

      `aliases, dataSourceSelection`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MDRepositoryBeanWithStatistics(Class<?>... repoClazz)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `everyHour()`
    `void` | `everyMinute()`
    `void` | `everySecond()`
    `protected Map<String,T>` | `getRepositories()` Provides access to unmodifiable map domain to repository instance
    `protected T` | `getRepository(String domain)` Provides repository instance for passed domain name
    `void` | `getStatistics(String compName, StatisticsList list)`
    `void` | `setStatisticsEnabled(boolean value)`
    `protected void` | `updateDataSourceAware(String domain, T newRepo, T oldRepo)` Method called when repository instance for domain changes.
    `void` | `wrapInProxy(String name, T repo)`

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

      `beforeUnregister, findClassForDataSource, getName, initialize, initializeRepository, onDataSourceChange, register, registerIfNotExists, repositoriesStream, setDataSourceBean, 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

    - #### MDRepositoryBeanWithStatistics

          public MDRepositoryBeanWithStatistics(Class<?>... repoClazz)

  - ### Method Detail

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

    - #### getStatistics

          public void getStatistics(String compName,
                                    StatisticsList list)

      Specified by:
        `getStatistics` in interface `StatisticsProviderIfc`

    - #### setStatisticsEnabled

          public void setStatisticsEnabled(boolean value)

    - #### wrapInProxy

          public void wrapInProxy(String name,
                                  T repo)

    - #### getRepository

          protected T getRepository(String domain)

      Description copied from class: `MDRepositoryBean`
      Provides repository instance for passed domain name
      Overrides:
        `getRepository` in class `MDRepositoryBean<T extends DataSourceAware>`
      Returns:
        instance of repository

    - #### getRepositories

          protected Map<String,T> getRepositories()

      Description copied from class: `MDRepositoryBean`
      Provides access to unmodifiable map domain to repository instance
      Overrides:
        `getRepositories` in class `MDRepositoryBean<T extends DataSourceAware>`
      Returns:
        map of domain to repository instance

    - #### updateDataSourceAware

          protected void updateDataSourceAware(String domain,
                                               T newRepo,
                                               T oldRepo)

      Description copied from class: `MDRepositoryBean`
      Method called when repository instance for domain changes.
      Overrides:
        `updateDataSourceAware` in class `MDRepositoryBean<T extends DataSourceAware>`
      Parameters:
        `domain` - name of domain
        `newRepo` - new instance of repository
        `oldRepo` - old instance of repository

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