Interface ManagedObjectStartupCompletion
-
public interface ManagedObjectStartupCompletion
Startup completion for a
ManagedObjectSource
.This allows a
ManagedObjectSource
to block theOfficeFloor
from servicing until this is complete.Ideally,
OfficeFloor
is aimed to startup as quick as possible to allow for patterns such as scale to zero. However for example, having to migrate the data store structure on start up of new version of an application requires not servicing until the data store is migrated. This, therefore, allows blocking servicing until these start up functionalities complete.Methods on this interface are
Thread
safe, so may be called fromManagedFunction
instances.For
ManagedObjectSource
implementors, please use this sparingly as it does impact start up times.- Author:
- Daniel Sagenschneider
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
complete()
Flags the startup complete andOfficeFloor
may start servicing.void
failOpen(java.lang.Throwable cause)
Flags to fail opening theOfficeFloor
.
-
-
-
Method Detail
-
complete
void complete()
Flags the startup complete andOfficeFloor
may start servicing.
-
failOpen
void failOpen(java.lang.Throwable cause)
Flags to fail opening theOfficeFloor
.- Parameters:
cause
- Cause of failing to openOfficeFloor
.
-
-