Class EventPersistenceSettings.Builder
java.lang.Object
io.hypersistence.optimizer.core.event.persistence.EventPersistenceSettings.Builder
- Enclosing class:
- EventPersistenceSettings
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()setApplicationName(String applicationName) setBatchSize(int batchSize) setConnectionExecutor(io.hypersistence.optimizer.util.ConnectionExecutor connectionExecutor) Set an explicitConnectionExecutor, used only when noSessionFactoryis provided (mainly for tests that exercise the aggregator without a database).setMaxRollupSize(int maxRollupSize) setRollupWindowMillis(long rollupWindowMillis) setSchemaAction(SchemaAction schemaAction) setSessionFactory(org.hibernate.SessionFactory sessionFactory) Set the host application'sSessionFactory.setWebAppAuthPassword(String webAppAuthPassword) setWebAppAuthUsername(String webAppAuthUsername) setWebAppEnabled(boolean webAppEnabled) setWebAppHost(String webAppHost) setWebAppPort(int webAppPort)
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
setSessionFactory
public EventPersistenceSettings.Builder setSessionFactory(org.hibernate.SessionFactory sessionFactory) Set the host application'sSessionFactory. The event persistence feature reuses it both to generate the schema from its dialect and to borrow JDBC connections for the inserts, so the events are stored with the same database credentials as the application.- Parameters:
sessionFactory- the hostSessionFactory- Returns:
- this
EventPersistenceSettings.Builder
-
setConnectionExecutor
public EventPersistenceSettings.Builder setConnectionExecutor(io.hypersistence.optimizer.util.ConnectionExecutor connectionExecutor) Set an explicitConnectionExecutor, used only when noSessionFactoryis provided (mainly for tests that exercise the aggregator without a database).- Parameters:
connectionExecutor- theConnectionExecutor- Returns:
- this
EventPersistenceSettings.Builder
-
setApplicationName
-
setBatchSize
-
setRollupWindowMillis
-
setMaxRollupSize
-
setSchemaAction
-
setWebAppEnabled
-
setWebAppHost
-
setWebAppPort
-
setWebAppAuthUsername
-
setWebAppAuthPassword
-
build
-