@@ -0,0 +1,1701 @@
+/*%0A * Licensed to the University of California, Berkeley under one or more contributor license%0A * agreements. See the NOTICE file distributed with this work for additional information regarding%0A * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the%0A * %22License%22); you may not use this file except in compliance with the License. You may obtain a%0A * copy of the License at%0A *%0A * http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software distributed under the License%0A * is distributed on an %22AS IS%22 BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express%0A * or implied. See the License for the specific language governing permissions and limitations under%0A * the License.%0A */%0A%0Apackage tachyon.worker.keyvalue;%0A%0Aimport java.io.IOException;%0A%0A/**%0A * Interface of key-value Index.%0A */%0Apublic interface Index %7B%0A%0A  /**%0A   * Puts a key into the index, associated with an offset into the key-value payload.%0A   *%0A   * @param key bytes of key%0A   * @param offset offset of this key in payload%0A   * @return true on success, false otherwise%0A   */%0A  boolean put(byte%5B%5D key, int offset) throws IOException;%0A%0A  /**%0A   * Gets the bytes of value given the key%0A   *%0A   * @param key bytes of key%0A   * @param payload the byte array of all key value payload%0A   * @return bytes of value, or null if not found%0A   */%0A  byte%5B%5D get(byte%5B%5D key, PayloadReader reader) throws IOException ;%0A%0A  /**%0A   * @return size of this index in bytes.%0A   */%0A  int byteCount();%0A%0A  /**%0A   * @return size of this index in bytes.%0A   */%0A  int keyCount();%0A%0A  /**%0A   * @return byte array of this index.%0A   */%0A  byte%5B%5D toByteArray();%0A%7D%0A

Add interface of KeyValue index