Class EventPersistenceSettings
java.lang.Object
io.hypersistence.optimizer.core.event.persistence.EventPersistenceSettings
The
EventPersistenceSettings is an immutable holder for the resolved event
persistence configuration, computed once when the feature is activated.- Since:
- 2.14.0
- Author:
- Vlad Mihalcea
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe default application name, used when none is configured.static final intThe default JDBC batch size used when inserting events.static final intThe default cap on the number of pending runtime rollups held in memory.static final longThe default runtime rollup window, in milliseconds (5 minutes).static final StringThe default host the web app binds to.static final StringThe name of the table holding the configuration and mapping events of each bootstrap.static final StringThe name of the table holding one row per optimizer bootstrap.static final StringThe name of the table holding the aggregated runtime events. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Create a newEventPersistenceSettings.Builder.intio.hypersistence.optimizer.util.ConnectionExecutorGet the name of the event table.intlongGet the name of the run table.Get the name of the runtime rollup table.org.hibernate.SessionFactoryThe Basic authentication password for the web app, ornullfor no auth.The Basic authentication user name for the web app, ornullfor no auth.The host the web app binds to (defaultlocalhost).intThe port the web app binds to.booleanWhether the web app should be started inside the host application.
-
Field Details
-
DEFAULT_ROLLUP_WINDOW_MILLIS
public static final long DEFAULT_ROLLUP_WINDOW_MILLISThe default runtime rollup window, in milliseconds (5 minutes).- See Also:
-
DEFAULT_BATCH_SIZE
public static final int DEFAULT_BATCH_SIZEThe default JDBC batch size used when inserting events.- See Also:
-
DEFAULT_MAX_ROLLUP_SIZE
public static final int DEFAULT_MAX_ROLLUP_SIZEThe default cap on the number of pending runtime rollups held in memory.- See Also:
-
DEFAULT_APPLICATION_NAME
The default application name, used when none is configured.- See Also:
-
DEFAULT_WEB_APP_HOST
The default host the web app binds to.- See Also:
-
RUN_TABLE
The name of the table holding one row per optimizer bootstrap.- See Also:
-
EVENT_TABLE
The name of the table holding the configuration and mapping events of each bootstrap.- See Also:
-
RUNTIME_EVENT_TABLE
The name of the table holding the aggregated runtime events.- See Also:
-
-
Method Details
-
getSessionFactory
public org.hibernate.SessionFactory getSessionFactory() -
getConnectionExecutor
public io.hypersistence.optimizer.util.ConnectionExecutor getConnectionExecutor() -
getApplicationName
-
getBatchSize
public int getBatchSize() -
getRollupWindowMillis
public long getRollupWindowMillis() -
getMaxRollupSize
public int getMaxRollupSize() -
getSchemaAction
-
isWebAppEnabled
public boolean isWebAppEnabled()Whether the web app should be started inside the host application.- Returns:
trueif the web app is enabled
-
getWebAppHost
The host the web app binds to (defaultlocalhost).- Returns:
- the web app host
-
getWebAppPort
public int getWebAppPort()The port the web app binds to.0(the default) requests a dynamically allocated free port, whose resolved value is logged at startup.- Returns:
- the web app port
-
getWebAppAuthUsername
The Basic authentication user name for the web app, ornullfor no auth.- Returns:
- the web app auth user name
-
getWebAppAuthPassword
The Basic authentication password for the web app, ornullfor no auth.- Returns:
- the web app auth password
-
getRunTable
Get the name of the run table.- Returns:
- the run table name
-
getEventTable
Get the name of the event table.- Returns:
- the event table name
-
getRuntimeRollupTable
Get the name of the runtime rollup table.- Returns:
- the runtime rollup table name
-
builder
Create a newEventPersistenceSettings.Builder.- Returns:
- a new
EventPersistenceSettings.Builder
-