Interface ManagedObjectStartupCompletion
-
public interface ManagedObjectStartupCompletionStartup completion for a
ManagedObjectSource.This allows a
ManagedObjectSourceto block theOfficeFloorfrom servicing until this is complete.Ideally,
OfficeFlooris 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
Threadsafe, so may be called fromManagedFunctioninstances.For
ManagedObjectSourceimplementors, 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 voidcomplete()Flags the startup complete andOfficeFloormay start servicing.voidfailOpen(java.lang.Throwable cause)Flags to fail opening theOfficeFloor.
-
-
-
Method Detail
-
complete
void complete()
Flags the startup complete andOfficeFloormay start servicing.
-
failOpen
void failOpen(java.lang.Throwable cause)
Flags to fail opening theOfficeFloor.- Parameters:
cause- Cause of failing to openOfficeFloor.
-
-