DictionaryConfiguration configuration = configFactory.build(new File(args[0]));
CuratorFramework curator = newCurator(configuration.getZooKeeperConfiguration());
// Connection caching is optional, but included here for the sake of demonstration.
ServiceCachingPolicy cachingPolicy = new ServiceCachingPolicyBuilder()
.withMaxNumServiceInstances(10)
.withMaxNumServiceInstancesPerEndPoint(1)
.withMaxServiceInstanceIdleTime(5, TimeUnit.MINUTES)
.build();