jira-importer commented on issue #554:
URL: https://github.com/apache/curator/issues/554#issuecomment-2604695476

   <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_r15124028"; 
class="external-link" target="_blank" rel="nofollow 
noopener">https://github.com/apache/curator/pull/17#discussion_r15124028</a></p>
   
   <p>    &#8212; Diff: 
curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/TreeCacheEvent.java
 &#8212;<br/>
       @@ -0,0 +1,126 @@<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/>
       +/**<br/>
       + * POJO that abstracts a change to a path<br/>
       + */<br/>
       +public class TreeCacheEvent<br/>
       +{<br/>
       +    private final Type type;<br/>
       +    private final ChildData data;<br/>
       +<br/>
       +    /**<br/>
       +     * Type of change<br/>
       +     */<br/>
       +    public enum Type<br/>
       +    {<br/>
       +/**<br/>
       + * A node was added.<br/>
       + */<br/>
       +NODE_ADDED,<br/>
       +<br/>
       +/**<br/>
       + * A node's data was changed<br/>
       + */<br/>
       +NODE_UPDATED,<br/>
       +<br/>
       +/**<br/>
       + * A node was removed from the tree<br/>
       + */<br/>
       +NODE_REMOVED,<br/>
       +<br/>
       +/**<br/>
       + * Called when the connection has changed to </p>
   {@link org.apache.curator.framework.state.ConnectionState#SUSPENDED}
   <p>    + * <p/><br/>
       + * This is exposed so that users of the class can be notified of issues 
that <b>might</b> affect normal operation.<br/>
       + * The TreeCache is written such that listeners are not expected to do 
anything special on this<br/>
       + * event, except for those people who want to cause some 
application-specific logic to fire when this occurs.<br/>
       + * While the connection is down, the TreeCache will continue to have 
its state from before it lost<br/>
       + * the connection and after the connection is restored, the TreeCache 
will emit normal child events<br/>
       + * for all of the adds, deletes and updates that happened during the 
time that it was disconnected.<br/>
       + */<br/>
       +CONNECTION_SUSPENDED,<br/>
       +<br/>
       +/**<br/>
       + * Called when the connection has changed to </p>
   {@link org.apache.curator.framework.state.ConnectionState#RECONNECTED}
   <p>    + * <p/><br/>
       + * This is exposed so that users of the class can be notified of issues 
that <b>might</b> affect normal operation.<br/>
       + * The TreeCache is written such that listeners are not expected to do 
anything special on this<br/>
       + * event, except for those people who want to cause some 
application-specific logic to fire when this occurs.<br/>
       + * While the connection is down, the TreeCache will continue to have 
its state from before it lost<br/>
       + * the connection and after the connection is restored, the TreeCache 
will emit normal child events<br/>
       + * for all of the adds, deletes and updates that happened during the 
time that it was disconnected.<br/>
       + */<br/>
       +CONNECTION_RECONNECTED,<br/>
       +<br/>
       +/**<br/>
       + * Called when the connection has changed to </p>
   {@link org.apache.curator.framework.state.ConnectionState#LOST}
   <p>    + * <p/><br/>
       + * This is exposed so that users of the class can be notified of issues 
that <b>might</b> affect normal operation.<br/>
       + * The TreeCache is written such that listeners are not expected to do 
anything special on this<br/>
       + * event, except for those people who want to cause some 
application-specific logic to fire when this occurs.<br/>
       + * While the connection is down, the TreeCache will continue to have 
its state from before it lost<br/>
       + * the connection and after the connection is restored, the TreeCache 
will emit normal child events<br/>
       + * for all of the adds, deletes and updates that happened during the 
time that it was disconnected.<br/>
       + */<br/>
       +CONNECTION_LOST,<br/>
       +<br/>
       +/**<br/>
       + * Posted when the initial cache has been populated.<br/>
       &#8212; End diff &#8211;</p>
   
   <p>    is this the same behavior as the `PathChildrenCache` (e.g. events 
fire during initialization, and then initialization marks that the tree has 
been built?)</p>
   
   <p>    I can see arguments for structuring this both ways, but it's easy 
enough to compose the path children cache kind of behavior if you need to just 
block for the initialized event. In either case, I think the doc should be more 
clear about what's going on here. (And in `PathChildrenCache`)</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

Reply via email to