curator-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CURATOR-33) Recursive Node Cache
Date Tue, 05 Aug 2014 15:14:11 GMT

    [ https://issues.apache.org/jira/browse/CURATOR-33?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14086354#comment-14086354
] 

ASF GitHub Bot commented on CURATOR-33:
---------------------------------------

Github user dragonsinth commented on a diff in the pull request:

    https://github.com/apache/curator/pull/17#discussion_r15819016
  
    --- Diff: curator-recipes/src/test/java/org/apache/curator/framework/recipes/cache/BaseTestTreeCache.java
---
    @@ -0,0 +1,173 @@
    +/**
    + * 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.recipes.cache;
    +
    +import org.apache.curator.framework.CuratorFramework;
    +import org.apache.curator.framework.CuratorFrameworkFactory;
    +import org.apache.curator.framework.api.UnhandledErrorListener;
    +import org.apache.curator.retry.RetryOneTime;
    +import org.apache.curator.test.BaseClassForTests;
    +import org.apache.curator.test.Timing;
    +import org.apache.curator.utils.CloseableUtils;
    +import org.testng.Assert;
    +import org.testng.annotations.AfterMethod;
    +import org.testng.annotations.BeforeMethod;
    +import java.util.ArrayList;
    +import java.util.List;
    +import java.util.concurrent.BlockingQueue;
    +import java.util.concurrent.LinkedBlockingQueue;
    +import java.util.concurrent.TimeUnit;
    +
    +public class BaseTestTreeCache extends BaseClassForTests
    +{
    +    private final Timing timing = new Timing();
    +    CuratorFramework client;
    +    TreeCache cache;
    +    private List<Throwable> exceptions;
    +    private BlockingQueue<TreeCacheEvent> events;
    +    TreeCacheListener eventListener;
    +
    +    /**
    +     * A TreeCache that records exceptions and automatically adds a listener.
    +     */
    +    class TreeCache extends org.apache.curator.framework.recipes.cache.TreeCache
    --- End diff --
    
    Because the local class shadows it.  `class TreeCache extends TreeCache` would extend
itself.  Arguably, I could rename the local class to "MyTreeCache" or something, if you guys
think that's the better style.


> Recursive Node Cache
> --------------------
>
>                 Key: CURATOR-33
>                 URL: https://issues.apache.org/jira/browse/CURATOR-33
>             Project: Apache Curator
>          Issue Type: Improvement
>          Components: Recipes
>            Reporter: John Vines
>            Assignee: Jordan Zimmerman
>             Fix For: TBD
>
>         Attachments: CURATOR-33.2.patch, CURATOR-33.patch
>
>
> Currently the PathChildrenCache will trigger listen events for all children at the given
node. However, it would be useful to have a cache that would trigger listen events for the
entire hierarchy below the given node.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message