Package io.antmedia.datastore.db
Class DataStoreFactory
java.lang.Object
io.antmedia.datastore.db.DataStoreFactory
- All Implemented Interfaces:
IDataStoreFactory,Aware,ApplicationContextAware
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate AppSettingsprivate DataStorestatic final Stringstatic final Stringstatic final Stringstatic final Stringprivate Stringprivate Stringprivate StringOne of the DB_TYPE_*private Stringprivate static org.slf4j.Loggerstatic final Stringstatic final Stringstatic final Stringprivate io.vertx.core.Vertxprivate booleanprivate booleanFields inherited from interface io.antmedia.datastore.db.IDataStoreFactory
BEAN_NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidinit()booleanbooleanvoidsetApplicationContext(ApplicationContext applicationContext) voidsetDataStore(DataStore dataStore) voidvoidvoidvoidsetWriteStatsToDatastore(boolean writeStatsToDatastore) voidsetWriteSubscriberEventsToDatastore(boolean writeSubscriberEventsToDatastore)
-
Field Details
-
DB_TYPE_MEMORYDB
- See Also:
-
DB_TYPE_MAPDB
- See Also:
-
DB_TYPE_MONGODB
- See Also:
-
DB_TYPE_REDISDB
- See Also:
-
SETTINGS_DB_NAME
- See Also:
-
SETTINGS_DB_TYPE
- See Also:
-
SETTINGS_DB_HOST
- See Also:
-
logger
private static org.slf4j.Logger logger -
dataStore
-
dbName
-
dbType
One of the DB_TYPE_* -
dbHost
-
hostAddress
-
vertx
private io.vertx.core.Vertx vertx -
writeStatsToDatastore
private boolean writeStatsToDatastore -
writeSubscriberEventsToDatastore
private boolean writeSubscriberEventsToDatastore -
appSettings
-
-
Constructor Details
-
DataStoreFactory
public DataStoreFactory()
-
-
Method Details
-
getDbName
-
setDbName
-
getDbType
-
setDbType
-
getDbHost
-
setDbHost
-
init
public void init() -
getDataStore
- Specified by:
getDataStorein interfaceIDataStoreFactory
-
setDataStore
-
isWriteStatsToDatastore
public boolean isWriteStatsToDatastore() -
setWriteStatsToDatastore
public void setWriteStatsToDatastore(boolean writeStatsToDatastore) -
setApplicationContext
- Specified by:
setApplicationContextin interfaceApplicationContextAware- Throws:
BeansException
-
setWriteSubscriberEventsToDatastore
public void setWriteSubscriberEventsToDatastore(boolean writeSubscriberEventsToDatastore) -
isWriteSubscriberEventsToDatastore
public boolean isWriteSubscriberEventsToDatastore()
-