public class GuiceJpaInitializer extends Object
Constructor and Description |
---|
GuiceJpaInitializer(com.google.inject.persist.PersistService service,
AmbariEventPublisher publisher)
GuiceJpaInitializer constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
setInitialized()
Called to indicate that the JPA service is initialized and ready for use.
|
@Inject public GuiceJpaInitializer(com.google.inject.persist.PersistService service, AmbariEventPublisher publisher)
Starts the JPA service and holds on to an AmbariEventPublisher
for future use.
service
- the persist servicepublisher
- the Ambari event publisherpublic void setInitialized()
This means that the schema for the underlying database matches the JPA entity objects expectations and the PersistService has been started.
A JpaInitializedEvent
is published so that subscribers can perform database-related tasks
when the infrastructure is ready.
Copyright © 2022 Apache Software Foundation. All rights reserved.