jira-importer commented on issue #554: URL: https://github.com/apache/curator/issues/554#issuecomment-2604695501
<i><a href="https://issues.apache.org/jira/secure/ViewProfile.jspa?name=githubbot">githubbot</a>:</i> <p>Github user cconroy commented on a diff in the pull request:</p> <p> <a href="https://github.com/apache/curator/pull/17#discussion_r15127380" class="external-link" target="_blank" rel="nofollow noopener">https://github.com/apache/curator/pull/17#discussion_r15127380</a></p> <p> — Diff: curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/TreeCache.java —<br/> @@ -0,0 +1,600 @@<br/> +/**<br/> + * Licensed to the Apache Software Foundation (ASF) under one<br/> + * or more contributor license agreements. See the NOTICE file<br/> + * distributed with this work for additional information<br/> + * regarding copyright ownership. The ASF licenses this file<br/> + * to you under the Apache License, Version 2.0 (the<br/> + * "License"); you may not use this file except in compliance<br/> + * with the License. You may obtain a copy of the License at<br/> + *<br/> + * <a href="http://www.apache.org/licenses/LICENSE-2.0" class="external-link" target="_blank" rel="nofollow noopener">http://www.apache.org/licenses/LICENSE-2.0</a><br/> + *<br/> + * Unless required by applicable law or agreed to in writing,<br/> + * software distributed under the License is distributed on an<br/> + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY<br/> + * KIND, either express or implied. See the License for the<br/> + * specific language governing permissions and limitations<br/> + * under the License.<br/> + */<br/> +<br/> +package org.apache.curator.framework.recipes.cache;<br/> +<br/> +import com.google.common.base.Function;<br/> +import com.google.common.collect.ImmutableSortedSet;<br/> +import com.google.common.collect.Maps;<br/> +import org.apache.curator.framework.CuratorFramework;<br/> +import org.apache.curator.framework.api.BackgroundCallback;<br/> +import org.apache.curator.framework.api.CuratorEvent;<br/> +import org.apache.curator.framework.listen.ListenerContainer;<br/> +import org.apache.curator.framework.state.ConnectionState;<br/> +import org.apache.curator.framework.state.ConnectionStateListener;<br/> +import org.apache.curator.utils.CloseableExecutorService;<br/> +import org.apache.curator.utils.ThreadUtils;<br/> +import org.apache.curator.utils.ZKPaths;<br/> +import org.apache.zookeeper.KeeperException;<br/> +import org.apache.zookeeper.WatchedEvent;<br/> +import org.apache.zookeeper.Watcher;<br/> +import org.apache.zookeeper.data.Stat;<br/> +import org.slf4j.Logger;<br/> +import org.slf4j.LoggerFactory;<br/> +import java.io.Closeable;<br/> +import java.io.IOException;<br/> +import java.util.ArrayList;<br/> +import java.util.Collections;<br/> +import java.util.List;<br/> +import java.util.SortedSet;<br/> +import java.util.concurrent.ConcurrentMap;<br/> +import java.util.concurrent.ExecutorService;<br/> +import java.util.concurrent.Executors;<br/> +import java.util.concurrent.ThreadFactory;<br/> +import java.util.concurrent.atomic.AtomicLong;<br/> +import java.util.concurrent.atomic.AtomicReference;<br/> +<br/> +/**<br/> + * <p>A utility that attempts to keep all data from all children of a ZK path locally cached. This class<br/> + * will watch the ZK path, respond to update/create/delete events, pull down the data, etc. You can<br/> + * register a listener that will get notified when changes occur.</p><br/> + * <p></p><br/> + * <p><b>IMPORTANT</b> - it's not possible to stay transactionally in sync. Users of this class must<br/> — End diff –</p> <p> Worth doing more than just tree-order on re-sync but also giving zkId order? Probably not since I can think of edge cases where interleaved creations and deletions would cause pure mzkid ordering to conflict with tree order...</p> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@curator.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org