1 // Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
2 package com.intellij.util.indexing.impl.forward;
4 import com.intellij.openapi.util.io.ByteArraySequence;
5 import com.intellij.util.io.KeyValueStore;
6 import org.jetbrains.annotations.ApiStatus;
7 import org.jetbrains.annotations.NotNull;
8 import org.jetbrains.annotations.Nullable;
10 import java.io.IOException;
13 * Represents key-value storage held by <a href="https://en.wikipedia.org/wiki/Search_engine_indexing#The_forward_index">forward index data structure</>.
15 @ApiStatus.Experimental
16 public interface ForwardIndex extends KeyValueStore<Integer, ByteArraySequence> {
19 ByteArraySequence get(@NotNull Integer key) throws IOException;
22 void put(@NotNull Integer key, @Nullable ByteArraySequence value) throws IOException;
24 void clear() throws IOException;