Package org.saidone.component
Class AuditCollectionCreator
java.lang.Object
org.saidone.component.BaseComponent
org.saidone.component.AuditCollectionCreator
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware
Creates and configures the MongoDB time series collection used to persist
audit entries.
The collection is initialised on startup if it does not already exist
and is configured with a TTL index so that documents expire automatically
after ttlDays days.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidinit()Creates the audit collection if it does not already exist and configures the collection to expire entries afterttlDaysdays.Methods inherited from class org.saidone.component.BaseComponent
setApplicationContext, shutDown, stop
-
Constructor Details
-
AuditCollectionCreator
public AuditCollectionCreator()
-
-
Method Details
-
init
@PostConstruct public void init()Creates the audit collection if it does not already exist and configures the collection to expire entries afterttlDaysdays.- Overrides:
initin classBaseComponent
-