apex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ashishtadose <...@git.apache.org>
Subject [GitHub] incubator-apex-malhar pull request: MLHR-1938 - Operator checkpoin...
Date Thu, 17 Dec 2015 20:21:48 GMT
Github user ashishtadose commented on a diff in the pull request:

    https://github.com/apache/incubator-apex-malhar/pull/125#discussion_r47956060
  
    --- Diff: library/src/main/java/com/datatorrent/lib/util/StorageAgentKeyValueStore.java
---
    @@ -0,0 +1,88 @@
    +/**
    + * 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 com.datatorrent.lib.util;
    +
    +import java.io.IOException;
    +import java.util.List;
    +
    +/**
    + * Interface for KeyValue store
    + * 
    + */
    +public interface StorageAgentKeyValueStore
    +{
    +
    +  /**
    +   * Connects to the service.
    +   *
    +   * @throws IOException
    +   */
    +  public void connect() throws IOException;
    +
    +  /**
    +   * Disconnects from the service.
    +   *
    +   * @throws IOException
    +   */
    +  public void disconnect() throws IOException;
    +
    +  /**
    +   *
    +   * @return returns whether the service is connected.
    +   */
    +  public boolean isConnected();
    +
    +  /**
    +   * Gets the value given the key.
    +   *
    +   * @param key
    +   * @return the value
    +   */
    +  public Object get(Object key);
    +
    +  /**
    +   * Sets the key with the value in the store.
    +   *
    +   * @param key
    +   * @param value
    +   */
    +  public void put(Object key, Object value);
    +
    +  /**
    +   * Removes the key and the value given the key
    +   * 
    +   * @param key
    +   */
    +  public void remove(Object key);
    +
    +  /**
    +   * Get all the keys associated with key
    +   * 
    +   * @param key
    +   * @return the list of all associated keys
    +   */
    +  public List<String> getKeys(Object key);
    +
    +  /**
    +   * Set table/region name of store
    +   * 
    +   * @param tableName
    +   */
    +  public void setTableName(String tableName);
    --- End diff --
    
    I thought it would be common for any key value store service as most of them have notion
 of table, region to denote to particular storage instance. 



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message