@Singleton
@Requires(property="crac.refresh-beans",
defaultValue="true",
value="true")
public class RefreshEventResource
extends java.lang.Object
implements OrderedResource
| Constructor and Description |
|---|
RefreshEventResource(CracEventPublisher cracEventPublisher,
io.micronaut.context.event.ApplicationEventPublisher<io.micronaut.runtime.context.scope.refresh.RefreshEvent> refreshEventPublisher) |
| Modifier and Type | Method and Description |
|---|---|
void |
afterRestore(org.crac.Context<? extends org.crac.Resource> context) |
void |
beforeCheckpoint(org.crac.Context<? extends org.crac.Resource> context) |
int |
getOrder() |
public RefreshEventResource(CracEventPublisher cracEventPublisher, io.micronaut.context.event.ApplicationEventPublisher<io.micronaut.runtime.context.scope.refresh.RefreshEvent> refreshEventPublisher)
cracEventPublisher - The CRaC event publisherrefreshEventPublisher - The publisher to use to emit the RefreshEventpublic void beforeCheckpoint(org.crac.Context<? extends org.crac.Resource> context)
throws java.lang.Exception
beforeCheckpoint in interface org.crac.Resourcejava.lang.Exceptionpublic void afterRestore(org.crac.Context<? extends org.crac.Resource> context)
throws java.lang.Exception
afterRestore in interface org.crac.Resourcejava.lang.Exceptionpublic int getOrder()
getOrder in interface io.micronaut.core.order.Ordered