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.

    Daniel Sagenschneider
    • Method Detail

      • complete

        void complete()
        Flags the startup complete and OfficeFloor may start servicing.
      • failOpen

        void failOpen​(java.lang.Throwable cause)
        Flags to fail opening the OfficeFloor.
        cause - Cause of failing to open OfficeFloor.