Examples of DropwizardConfiguredEnsembleProvider


Examples of com.datasift.dropwizard.curator.ensemble.DropwizardConfiguredEnsembleProvider

    public CuratorFramework build(final Environment environment, final String name) {
        final ZooKeeperFactory factory = getZooKeeperFactory();
        final String namespace = factory.getNamespace();
        final CuratorFrameworkFactory.Builder builder = CuratorFrameworkFactory.builder()
                .zookeeperFactory(new DropwizardConfiguredZooKeeperFactory(environment, name))
                .ensembleProvider(new DropwizardConfiguredEnsembleProvider(factory))
                .connectionTimeoutMs((int) factory.getConnectionTimeout().toMilliseconds())
                .threadFactory(new ThreadFactoryBuilder().setNameFormat(name + "-%d").build())
                .sessionTimeoutMs((int) factory.getSessionTimeout().toMilliseconds())
                .namespace(namespace.startsWith("/") ? namespace.substring(1) : namespace)
                .compressionProvider(getCompressionProvider())
View Full Code Here

Examples of com.datasift.dropwizard.curator.ensemble.DropwizardConfiguredEnsembleProvider

    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())
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.