package com.thinkaurelius.titan.diskstorage.keycolumnvalue.keyvalue;

import com.thinkaurelius.titan.diskstorage.StaticBuffer;
import com.thinkaurelius.titan.diskstorage.StorageException;
import com.thinkaurelius.titan.diskstorage.keycolumnvalue.KeyColumnValueStore;
import com.thinkaurelius.titan.diskstorage.keycolumnvalue.StoreTransaction;
import com.thinkaurelius.titan.diskstorage.util.RecordIterator;

/**
 * @author Matthias Broecheler (me@matthiasb.com)
 */

public interface CacheStore extends KeyValueStore {
    /**
     * Insert a new value into cache for the given key.
     *
     * @param key The key to use for insertion.
     * @param value The new value to assign the key.
     * @param tx The transactional context for the change.
     *
     * @throws StorageException
     */
    public void insert(StaticBuffer key, StaticBuffer value, StoreTransaction tx) throws StorageException;

    /**
     * Sets the value associated with key "key" to "value" if the current value associated with this key is "oldValue", otherwise
     * it throws an {@link CacheUpdateException}.
     *
     * @param key
     * @param value
     * @param oldValue
     * @param txh
     * @throws StorageException
     */
    public void replace(StaticBuffer key, StaticBuffer value, StaticBuffer oldValue, StoreTransaction txh) throws StorageException;

    /**
     * Returns an iterator over all keys in this store that match the given KeySelector. The keys may be
     * ordered but not necessarily.
     *
     * @return An iterator over all keys in this store.
     */
    public RecordIterator<KeyValueEntry> getKeys(KeySelector selector, StoreTransaction txh) throws StorageException;
}

@@ -516,394 +516,8 @@
 e %7B%0A
-    /**%0A     * Insert a new value into cache for the given key.%0A     *%0A     * @param key The key to use for insertion.%0A     * @param value The new value to assign the key.%0A     * @param tx The transactional context for the change.%0A     *%0A     * @throws StorageException%0A     */%0A    public void insert(StaticBuffer key, StaticBuffer value, StoreTransaction tx) throws StorageException;%0A%0A
     

remove redundant CacheStore.insert method