accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] mikewalch commented on a change in pull request #361: ACCUMULO-4784 - Create builder for Connector
Date Thu, 01 Jan 1970 00:00:00 GMT
mikewalch commented on a change in pull request #361: ACCUMULO-4784 - Create builder for Connector
URL: https://github.com/apache/accumulo/pull/361#discussion_r167098316
 
 

 ##########
 File path: core/src/main/java/org/apache/accumulo/core/client/Connector.java
 ##########
 @@ -237,4 +282,271 @@ public abstract BatchDeleter createBatchDeleter(String tableName, Authorizations
    * @since 1.7.0
    */
   public abstract ReplicationOperations replicationOperations();
+
+  /**
+   * Builds ConnectionInfo after all options have been specified
+   *
+   * @since 2.0.0
+   */
+  public interface ConnInfoFactory {
+
+    /**
+     * Builds ConnectionInfo after all options have been specified
+     *
+     * @return ConnectionInfo
+     */
+    ConnectionInfo info();
+  }
+
+  /**
+   * Builds Connector
+   *
+   * @since 2.0.0
+   */
+  public interface ConnectorFactory extends ConnInfoFactory {
+
+    /**
+     * Builds Connector after all options have been specified
+     *
+     * @return Connector
+     */
+    Connector build() throws AccumuloException, AccumuloSecurityException;
+
+  }
+
+  /**
+   * Builder method for setting Accumulo instance and zookeepers
+   *
+   * @since 2.0.0
+   */
+  public interface InstanceArgs {
+    AuthenticationArgs forInstance(String instanceName, String zookeepers);
+  }
+
+  /**
+   * Builder methods for creating Connector using properties
+   *
+   * @since 2.0.0
+   */
+  public interface PropertyOptions extends InstanceArgs {
+
+    /**
+     * Build using properties file
+     *
+     * @param propertiesFile
+     *          Path to properties file
+     * @return this builder
+     */
+    ConnectorFactory usingProperties(String propertiesFile);
 
 Review comment:
   I prefer using String too 

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

Mime
View raw message