public CuratorFramework build(final CuratorConfiguration configuration, final String name) {
final ZooKeeperConfiguration zkConfiguration = configuration.getEnsembleConfiguration();
final ZooKeeperFactory factory = new ZooKeeperFactory(environment);
final CuratorFrameworkFactory.Builder builder = CuratorFrameworkFactory.builder()
.zookeeperFactory(new DropwizardConfiguredZooKeeperFactory(factory, name))
.ensembleProvider(new DropwizardConfiguredEnsembleProvider(zkConfiguration))
.connectionTimeoutMs((int) zkConfiguration.getConnectionTimeout().toMilliseconds())
.threadFactory(new ThreadFactoryBuilder().setNameFormat(name + "-%d").build())
.sessionTimeoutMs((int) zkConfiguration.getSessionTimeout().toMilliseconds())
.namespace(zkConfiguration.getNamespace())
.compressionProvider(configuration.getCompressionProvider())