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_r250296658
##########
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:
And what about making constructor private and adding a public static 'of'
method to build instances?
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services