Class ShutdownLatch

java.lang.Object
org.axonframework.common.lifecycle.ShutdownLatch

public class ShutdownLatch extends Object
A latch implementation to be used in shutdown scenarios. Activities to wait for can be added by invoking registerActivity(). A registered activity should always shutdown through the returned ShutdownLatch.ActivityHandle's ShutdownLatch.ActivityHandle.end() method once it has completed. Otherwise initiateShutdown() will block indefinitely. If the latch is waited on through initiateShutdown(), new operations can no longer be registered.
Since:
4.3
Author:
Steven van Beelen