Class SpringHazelcastLifecycle

java.lang.Object
org.frankframework.management.gateway.SpringHazelcastLifecycle
All Implemented Interfaces:
org.springframework.beans.factory.DisposableBean, org.springframework.context.Lifecycle, org.springframework.context.Phased

public class SpringHazelcastLifecycle extends Object implements org.springframework.context.Lifecycle, org.springframework.context.Phased, org.springframework.beans.factory.DisposableBean
A 'bridge' between Spring Lifecycles and Hazelcast. Does not need to start Hazelcast as that's done when the object has been made. But it does provide a safe (with the isRunning() method) shutdown procedure. Phased because it needs to shutdown before the HazelcastInboundGateway shuts down. Disposable which forces immediate shutdown.
  • Constructor Details

    • SpringHazelcastLifecycle

      public SpringHazelcastLifecycle(com.hazelcast.core.HazelcastInstance hzInstance)
  • Method Details

    • start

      public void start()
      Specified by:
      start in interface org.springframework.context.Lifecycle
    • stop

      public void stop()
      Specified by:
      stop in interface org.springframework.context.Lifecycle
    • isRunning

      public boolean isRunning()
      Specified by:
      isRunning in interface org.springframework.context.Lifecycle
    • getPhase

      public int getPhase()
      Specified by:
      getPhase in interface org.springframework.context.Phased
    • destroy

      public void destroy() throws Exception
      Specified by:
      destroy in interface org.springframework.beans.factory.DisposableBean
      Throws:
      Exception