Package org.kiwiproject.curator
Class ManagedCuratorFramework
- java.lang.Object
-
- org.kiwiproject.curator.ManagedCuratorFramework
-
- All Implemented Interfaces:
io.dropwizard.lifecycle.Managed
public class ManagedCuratorFramework extends Object implements io.dropwizard.lifecycle.Managed
A DropwizardManagedthat wraps aCuratorFrameworkinstance, starting and stopping it automatically with the application.
-
-
Constructor Summary
Constructors Constructor Description ManagedCuratorFramework(org.apache.curator.framework.CuratorFramework client)Create new instance that will manage the given client.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.curator.framework.CuratorFrameworkgetUnderlyingClient()voidstart()Starts the managedCuratorFrameworkclient if it is not started.voidstop()Stops the managedCuratorFrameworkclient if it is started.StringtoString()
-
-
-
Method Detail
-
getUnderlyingClient
public org.apache.curator.framework.CuratorFramework getUnderlyingClient()
- Returns:
- the managed
CuratorFrameworkclient
-
start
public void start()
Starts the managedCuratorFrameworkclient if it is not started.- Specified by:
startin interfaceio.dropwizard.lifecycle.Managed
-
stop
public void stop()
Stops the managedCuratorFrameworkclient if it is started.- Specified by:
stopin interfaceio.dropwizard.lifecycle.Managed
-
-