Package tigase.stats.db
Class CounterDataLoggerRepoBean
- java.lang.Object
-
- tigase.db.beans.MDRepositoryBean<T>
-
- tigase.db.beans.MDRepositoryBeanWithStatistics<CounterDataLoggerRepositoryIfc>
-
- tigase.stats.db.CounterDataLoggerRepoBean
-
- All Implemented Interfaces:
DataSourceAware,Initializable,RegistrarBean,RegistrarBeanWithDefaultBeanClass,UnregisterAware,ComponentStatisticsProvider,CounterDataLoggerRepositoryIfc,StatisticsProviderIfc
@Bean(name="repository", active=true, parent=CounterDataLogger.class) public class CounterDataLoggerRepoBean extends MDRepositoryBeanWithStatistics<CounterDataLoggerRepositoryIfc> implements CounterDataLoggerRepositoryIfc
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCounterDataLoggerRepoBean.CounterDataLoggerConfigBean-
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
-
Fields inherited from interface tigase.stats.db.CounterDataLoggerRepositoryIfc
BOSH_CONNS_COL, C2S_CONNS_COL, C2S_PACKETS_COL, CPU_USAGE_COL, EXT_PACKETS_COL, HOSTNAME_COL, IQS_COL, MEM_USAGE_COL, MESSAGES_COL, MUC_PACKETS_COL, PRESENCES_COL, PUBSUB_PACKETS_COL, REGISTERED_COL, S2S_CONNS_COL, S2S_PACKETS_COL, SM_CONNECTIONS_COL, SM_PACKETS_COL, SM_SESSIONS_COL, STATS_TABLE, UPTIME_COL, VHOSTS_COL, WS2S_CONNS_COL, WS2S_PACKETS_COL
-
-
Constructor Summary
Constructors Constructor Description CounterDataLoggerRepoBean()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddStatsLogEntry(java.lang.String hostname, float cpu_usage, float mem_usage, long uptime, int vhosts, long sm_packets, long muc_packets, long pubsub_packets, long c2s_packets, long ws2s_packets, long s2s_packets, long ext_packets, long presences, long messages, long iqs, long registered, int c2s_conns, int ws2s_conns, int bosh_conns, int s2s_conns, int sm_sessions, int sm_connections)protected java.lang.Class<? extends CounterDataLoggerRepositoryIfc>findClassForDataSource(DataSource dataSource)Method returns class implementing repository which supports data source instance provided in parameter.java.lang.Class<?>getDefaultBeanClass()Returns default class for all bean which are defined using configuration as subbeans of bean implementing this interface.voidregister(Kernel kernel)Method called when bean is being registered allowing developer to programatically register other beans.voidsetDataSource(DataSource ds)Method called to provide class with instance of a data source.voidunregister(Kernel kernel)Method called while bean is being unregistered.-
Methods inherited from class tigase.db.beans.MDRepositoryBeanWithStatistics
everyHour, everyMinute, everySecond, getRepositories, getRepository, getStatistics, setStatisticsEnabled, updateDataSourceAware, wrapInProxy
-
Methods inherited from class tigase.db.beans.MDRepositoryBean
beforeUnregister, getName, initialize, initializeRepository, onDataSourceChange, registerIfNotExists, repositoriesStream, setDataSourceBean
-
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
-
-
-
-
Method Detail
-
addStatsLogEntry
public void addStatsLogEntry(java.lang.String hostname, float cpu_usage, float mem_usage, long uptime, int vhosts, long sm_packets, long muc_packets, long pubsub_packets, long c2s_packets, long ws2s_packets, long s2s_packets, long ext_packets, long presences, long messages, long iqs, long registered, int c2s_conns, int ws2s_conns, int bosh_conns, int s2s_conns, int sm_sessions, int sm_connections)- Specified by:
addStatsLogEntryin interfaceCounterDataLoggerRepositoryIfc
-
findClassForDataSource
protected java.lang.Class<? extends CounterDataLoggerRepositoryIfc> findClassForDataSource(DataSource dataSource) throws DBInitException
Description copied from class:MDRepositoryBeanMethod returns class implementing repository which supports data source instance provided in parameter.- Specified by:
findClassForDataSourcein classMDRepositoryBean<CounterDataLoggerRepositoryIfc>- Returns:
- repository class
- Throws:
DBInitException
-
getDefaultBeanClass
public java.lang.Class<?> getDefaultBeanClass()
Description copied from interface:RegistrarBeanWithDefaultBeanClassReturns default class for all bean which are defined using configuration as subbeans of bean implementing this interface. This allows users to have more convenient configuration file without the need to specify class for each of subbbeans if most of them will have the same class.- Specified by:
getDefaultBeanClassin interfaceRegistrarBeanWithDefaultBeanClass
-
register
public void register(Kernel kernel)
Description copied from interface:RegistrarBeanMethod called when bean is being registered allowing developer to programatically register other beans.- Specified by:
registerin interfaceRegistrarBean- Overrides:
registerin classMDRepositoryBean<CounterDataLoggerRepositoryIfc>- Parameters:
kernel- - instance from local scope
-
setDataSource
public void setDataSource(DataSource ds)
Description copied from interface:DataSourceAwareMethod called to provide class with instance of a data source.- Specified by:
setDataSourcein interfaceDataSourceAware
-
unregister
public void unregister(Kernel kernel)
Description copied from interface:RegistrarBeanMethod called while bean is being unregistered.- Specified by:
unregisterin interfaceRegistrarBean- Overrides:
unregisterin classMDRepositoryBean<CounterDataLoggerRepositoryIfc>- Parameters:
kernel- - instance from local scope
-
-