Repository: curator Updated Branches: refs/heads/CURATOR-351 44eb60c92 -> d0299661e
make sure you can use TTLs with orSetData Project: http://git-wip-us.apache.org/repos/asf/curator/repo Commit: http://git-wip-us.apache.org/repos/asf/curator/commit/d0299661 Tree: http://git-wip-us.apache.org/repos/asf/curator/tree/d0299661 Diff: http://git-wip-us.apache.org/repos/asf/curator/diff/d0299661 Branch: refs/heads/CURATOR-351 Commit: d0299661e87418aeb97ea50658a927c3647b2112 Parents: 44eb60c Author: randgalt <randg...@apache.org> Authored: Thu Dec 8 14:14:31 2016 +0100 Committer: randgalt <randg...@apache.org> Committed: Thu Dec 8 14:14:31 2016 +0100 ---------------------------------------------------------------------- .../curator/framework/api/CreateBuilder.java | 2 +- .../curator/framework/api/CreateBuilder2.java | 24 ++++++++++++++++++++ .../framework/imps/CreateBuilderImpl.java | 4 ++-- 3 files changed, 27 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/curator/blob/d0299661/curator-framework/src/main/java/org/apache/curator/framework/api/CreateBuilder.java ---------------------------------------------------------------------- diff --git a/curator-framework/src/main/java/org/apache/curator/framework/api/CreateBuilder.java b/curator-framework/src/main/java/org/apache/curator/framework/api/CreateBuilder.java index 8c98e0d..431a945 100644 --- a/curator-framework/src/main/java/org/apache/curator/framework/api/CreateBuilder.java +++ b/curator-framework/src/main/java/org/apache/curator/framework/api/CreateBuilder.java @@ -22,5 +22,5 @@ public interface CreateBuilder extends CreateBuilderMain { CreateBuilderMain withTtl(long ttl); - CreateBuilderMain orSetData(); + CreateBuilder2 orSetData(); } http://git-wip-us.apache.org/repos/asf/curator/blob/d0299661/curator-framework/src/main/java/org/apache/curator/framework/api/CreateBuilder2.java ---------------------------------------------------------------------- diff --git a/curator-framework/src/main/java/org/apache/curator/framework/api/CreateBuilder2.java b/curator-framework/src/main/java/org/apache/curator/framework/api/CreateBuilder2.java new file mode 100644 index 0000000..7e5c89a --- /dev/null +++ b/curator-framework/src/main/java/org/apache/curator/framework/api/CreateBuilder2.java @@ -0,0 +1,24 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.curator.framework.api; + +public interface CreateBuilder2 extends CreateBuilderMain +{ + CreateBuilderMain withTtl(long ttl); +} http://git-wip-us.apache.org/repos/asf/curator/blob/d0299661/curator-framework/src/main/java/org/apache/curator/framework/imps/CreateBuilderImpl.java ---------------------------------------------------------------------- diff --git a/curator-framework/src/main/java/org/apache/curator/framework/imps/CreateBuilderImpl.java b/curator-framework/src/main/java/org/apache/curator/framework/imps/CreateBuilderImpl.java index cc2b541..b3817bd 100644 --- a/curator-framework/src/main/java/org/apache/curator/framework/imps/CreateBuilderImpl.java +++ b/curator-framework/src/main/java/org/apache/curator/framework/imps/CreateBuilderImpl.java @@ -41,7 +41,7 @@ import java.util.concurrent.Callable; import java.util.concurrent.Executor; import java.util.concurrent.atomic.AtomicBoolean; -class CreateBuilderImpl implements CreateBuilder, BackgroundOperation<PathAndBytes>, ErrorListenerPathAndBytesable<String> +class CreateBuilderImpl implements CreateBuilder, CreateBuilder2, BackgroundOperation<PathAndBytes>, ErrorListenerPathAndBytesable<String> { private final CuratorFrameworkImpl client; private CreateMode createMode; @@ -79,7 +79,7 @@ class CreateBuilderImpl implements CreateBuilder, BackgroundOperation<PathAndByt } @Override - public CreateBuilderMain orSetData() + public CreateBuilder2 orSetData() { setDataIfExists = true; return this;