Interface ManagedObjectStartupCompletion
public interface ManagedObjectStartupCompletion
Startup completion for a ManagedObjectSource.
This allows a ManagedObjectSource to block the OfficeFloor
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 from
ManagedFunction instances.
For ManagedObjectSource implementors, please use this sparingly as it
does impact start up times.
- Author:
- Daniel Sagenschneider
-
Method Summary
Modifier and TypeMethodDescriptionvoidcomplete()Flags the startup complete andOfficeFloormay start servicing.voidFlags to fail opening theOfficeFloor.
-
Method Details
-
complete
void complete()Flags the startup complete andOfficeFloormay start servicing. -
failOpen
Flags to fail opening theOfficeFloor.- Parameters:
cause- Cause of failing to openOfficeFloor.
-