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 2019/07/10 21:33:33 UTC

[GitHub] [accumulo] ctubbsii edited a comment on issue #1221: New Security Interface

ctubbsii edited a comment on issue #1221: New Security Interface
URL: https://github.com/apache/accumulo/issues/1221#issuecomment-510237197
 
 
   I would argue in favor of small classes rather than an enum, for the following reasons:
   
   1. It allows us to organize actions in a type hierarchy with abstract base classes to group them together (not possible with Enums).
   2. It allows users to define their own actions in their own code if they want to.
   3. It makes our code a bit more extensible if we want to add more actions ourselves.
   
   Example:
   
   ```java
   interface Action {
     String description();
   }
   
   public abstract class TableAction {
     // note these are inner-classes to keep things organized
     public static class Split extends TableAction {
       // ...
     }
     public static class Scan extends TableAction {
       // ...
     }
     // ...
   }
   
   ```
   
   Some of these actions could be constructed with additional state information that can be used to help a policy engine determine whether the action can be performed or not.

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