DomGarguilo commented on a change in pull request #2324:
URL: https://github.com/apache/accumulo/pull/2324#discussion_r734668438



##########
File path: 
server/base/src/main/java/org/apache/accumulo/server/conf/store/PropStore.java
##########
@@ -0,0 +1,117 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.accumulo.server.conf.store;
+
+import java.util.Collection;
+import java.util.Map;
+
+import org.apache.accumulo.server.conf.codec.VersionedProperties;
+
+public interface PropStore {
+
+  /**
+   * Create an initial entry for the PropCacheId. If properties already exist, 
they are not
+   * modified.
+   *
+   * @param PropCacheId
+   *          the prop cache id
+   * @param props
+   *          a map of property k,v pairs
+   * @return true if created, false otherwise.
+   * @throws PropStoreException
+   *           if the updates fails because of an underlying store exception
+   */
+  boolean create(PropCacheId PropCacheId, Map<String,String> props) throws 
PropStoreException;
+
+  /**
+   *
+   * @param propCacheId
+   *          the prop cache id
+   * @return The versioned properties or null if the properties do not exist 
for the id.
+   * @throws PropStoreException
+   *           if the updates fails because of an underlying store exception
+   */
+  VersionedProperties get(PropCacheId propCacheId) throws PropStoreException;
+
+  /**
+   * Adds or updates current properties. If the property currently exists it 
is overwritten,
+   * otherwise it is added.
+   *
+   * @param propCacheId
+   *          the prop cache id
+   * @param props
+   *          a map of property k,v pairs
+   * @return true if successful, false otherwise
+   * @throws PropStoreException
+   *           if the updates fails because of an underlying store exception
+   */
+  boolean putAll(PropCacheId propCacheId, Map<String,String> props) throws 
PropStoreException;
+
+  /**
+   * Delete the store node from the underlying store.
+   *
+   * @param propCacheId
+   *          the prop cache id
+   * @throws PropStoreException
+   *           if the updates fails because of an underlying store exception
+   */
+  void delete(PropCacheId propCacheId) throws PropStoreException;
+
+  /**
+   * Deletes individual properties specified by the set of keys.
+   *
+   * @param propCacheId
+   *          the prop cache id
+   * @param keys
+   *          a set of keys.
+   * @return true if successful, false otherwise
+   * @throws PropStoreException
+   *           if the updates fails because of an underlying store exception
+   */
+  boolean removeProperties(PropCacheId propCacheId, Collection<String> keys)
+      throws PropStoreException;
+
+  /**
+   * Get a fixed set of defined properties (designated in Properties as 
fixed). Certain properties
+   * are stored in for persistence across restarts, they are read during 
start-up and remain

Review comment:
       "are stored in for persistence" is there a word missing here?




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to