You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2022/01/26 22:46:46 UTC

[GitHub] [accumulo] keith-turner commented on pull request #2432: Modified ThreadPools to conditionally register metrics

keith-turner commented on pull request #2432:
URL: https://github.com/apache/accumulo/pull/2432#issuecomment-1022672607


   > Boolean parameters can make code harder to read. Instead of boolean parameters, you could have a separate method name, like .action() and .actionWithMetrics(), or you could use a builder, like builder.withMetrics().build(), or you could have enums for flags, like .action(EnumSet.of(WITH_METRICS, OTHER_FLAG))
   
   Another option would be to replace the last boolean argument in the method with a new enum type.  The single boolean here is not too bad, an enum would be more readable.  We have had methods in the past w/ multiple boolean arguments and that was awful to read.


-- 
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: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org