You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2019/01/23 12:56:49 UTC

[GitHub] eolivelli commented on a change in pull request #1916: Add semantically meaningful return values to placement policy

eolivelli commented on a change in pull request #1916: Add semantically meaningful return values to placement policy
URL: https://github.com/apache/bookkeeper/pull/1916#discussion_r250176302
 
 

 ##########
 File path: bookkeeper-server/src/main/java/org/apache/bookkeeper/client/EnsemblePlacementPolicy.java
 ##########
 @@ -408,4 +407,25 @@ default boolean isEnsembleAdheringToPlacementPolicy(List<BookieSocketAddress> en
             int ackQuorumSize) {
         return false;
     }
+
+    /**
+     * Result of a placement calculation against a placement policy.
+     */
+    class PlacementResult<T> {
+        private final T result;
+        private final boolean adhering;
+
+        public PlacementResult(T result, boolean adhering) {
 
 Review comment:
   what about making the constructor private and making the class 'final' ?
   
   We can open to extensions on the future if needed

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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