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 Summary
Constructors -
Method Summary
-
Constructor Details
-
SpringHazelcastLifecycle
public SpringHazelcastLifecycle(com.hazelcast.core.HazelcastInstance hzInstance)
-
-
Method Details
-
start
public void start()- Specified by:
start
in interfaceorg.springframework.context.Lifecycle
-
stop
public void stop()- Specified by:
stop
in interfaceorg.springframework.context.Lifecycle
-
isRunning
public boolean isRunning()- Specified by:
isRunning
in interfaceorg.springframework.context.Lifecycle
-
getPhase
public int getPhase()- Specified by:
getPhase
in interfaceorg.springframework.context.Phased
-
destroy
- Specified by:
destroy
in interfaceorg.springframework.beans.factory.DisposableBean
- Throws:
Exception
-