You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by "keith-turner (via GitHub)" <gi...@apache.org> on 2023/09/28 22:35:01 UTC

[GitHub] [accumulo-access] keith-turner commented on a diff in pull request #16: Updates documentation and removes TODOs

keith-turner commented on code in PR #16:
URL: https://github.com/apache/accumulo-access/pull/16#discussion_r1340723055


##########
src/main/java/org/apache/accumulo/access/AccessEvaluator.java:
##########
@@ -117,15 +131,31 @@ interface AuthorizationsBuilder {
      *
      *
      */
-    ExecutionBuilder authorizations(Collection<Authorizations> authorizations);
+    OptionalBuilder authorizations(Collection<Authorizations> authorizations);
 
-    ExecutionBuilder authorizations(String... authorizations);
+    /**
+     * Allows specifying a single set of authorizations.
+     */
+    OptionalBuilder authorizations(String... authorizations);
 
-    ExecutionBuilder authorizations(Authorizer authorizer);
+    /**
+     * Allows specifying an authorizer that is analogous to a single set of authorization.
+     */
+    OptionalBuilder authorizations(Authorizer authorizer);
   }
 
-  interface ExecutionBuilder extends FinalBuilder {
-    ExecutionBuilder cacheSize(int cacheSize);
+  interface OptionalBuilder extends FinalBuilder {
+
+    /**
+     * When set to a value greater than zero, the result of evaluating expressions will be
+     * remembered and if the same expression is seen it again the remembered result will be used
+     * instead of reevaluating it. If this method is not called on the builder then no caching is
+     * done. When the same expressions can occur repeatedly caching can greatly increase
+     * performance.
+     *
+     * @param cacheSize the number of expressions evaluations to remember in an LRU cache.
+     */
+    OptionalBuilder cacheSize(int cacheSize);

Review Comment:
   Maybe if it would be best to just drop this functionality. It would be really easy for someone to wrap the evaluator with their own cache.  Could just recommend caching in the class level javadocs.



-- 
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