![JAR search and dependency download from the Maven repository](/logo.png)
com.datasift.dropwizard.curator.ManagedCuratorFramework Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dropwizard-extra-curator Show documentation
Show all versions of dropwizard-extra-curator Show documentation
Dropwizard integration for working with ZooKeeper using Netflix's Curator client.
The newest version!
package com.datasift.dropwizard.curator;
import org.apache.curator.framework.CuratorFramework;
import io.dropwizard.lifecycle.Managed;
/**
* Manages the lifecycle of a {@link CuratorFramework} instance.
*/
class ManagedCuratorFramework implements Managed {
private final CuratorFramework framework;
/**
* Manage the given {@link CuratorFramework} instance.
*
* @param framework the Curator instance to manage.
*/
public ManagedCuratorFramework(final CuratorFramework framework) {
this.framework = framework;
}
@Override
public void start() throws Exception {
framework.start();
}
@Override
public void stop() throws Exception {
framework.close();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy