You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@curator.apache.org by GitBox <gi...@apache.org> on 2019/08/03 21:11:39 UTC

[GitHub] [curator] shayshim commented on a change in pull request #320: [CURATOR-533] - improve circuit breaking behavior

shayshim commented on a change in pull request #320: [CURATOR-533] - improve circuit breaking behavior
URL: https://github.com/apache/curator/pull/320#discussion_r310363023
 
 

 ##########
 File path: curator-framework/src/main/java/org/apache/curator/framework/state/ConnectionStateListener.java
 ##########
 @@ -31,14 +31,14 @@
     void stateChanged(CuratorFramework client, ConnectionState newState);
 
     /**
-     * Normally, ConnectionStateListeners are decorated via the configured
-     * {@link org.apache.curator.framework.state.ConnectionStateListenerDecorator}. For certain
-     * critical cases, however, this is not desired. If your listener returns <code>true</code>
-     * for doNotDecorate(), it will not be passed through the decorator.
+     * ConnectionStateListener managers set via {@link org.apache.curator.framework.CuratorFrameworkFactory.Builder#connectionStateListenerManagerFactory(ConnectionStateListenerManagerFactory)}
+     * are allowed to proxy (etc.) ConnectionStateListeners as needed. If this method returns <code>true</code>
+     * the ConnectionStateListener manager must <em>not</em> proxy the listener as it's a vital internal
+     * listener used by Curator.
      *
      * @return true/false
      */
-    default boolean doNotDecorate()
+    default boolean doNotProxy()
 
 Review comment:
   I think proxy is a bit vague. Why not something like useCircuitBreaker() instead of doNotProxy(), to be more clear about the context it is used in? Unless you see future possibilities to call it also for other 'proxies' than the circuit breaker.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services