voldemort.store
Interface StorageEngine<K,V>

Type Parameters:
K - The type of the key being stored
V - The type of the value being stored
All Superinterfaces:
Store<K,V>
All Known Implementing Classes:
BdbStorageEngine, ConfigurationStorageEngine, InMemoryStorageEngine, MetadataStore, MysqlStorageEngine, ReadOnlyStorageEngine, SerializingStorageEngine, ViewStorageEngine

public interface StorageEngine<K,V>
extends Store<K,V>

A base storage class which is actually responsible for data persistence. This interface implies all the usual responsibilities of a Store implementation, and in addition

  1. The implementation MUST throw an ObsoleteVersionException if the user attempts to put a version which is strictly before an existing version (concurrent is okay)
  2. The implementation MUST increment this version number when the value is stored.
  3. The implementation MUST contain an ID identifying it as part of the cluster
A hash value can be produced for known subtrees of a StorageEngine


Method Summary
 ClosableIterator<Pair<K,Versioned<V>>> entries()
          Get an iterator over pairs of entries in the store.
 ClosableIterator<K> keys()
          Get an iterator over keys in the store.
 void truncate()
          Truncate all entries in the store
 
Methods inherited from interface voldemort.store.Store
close, delete, get, getAll, getCapability, getName, getVersions, put
 

Method Detail

entries

ClosableIterator<Pair<K,Versioned<V>>> entries()
Get an iterator over pairs of entries in the store. The key is the first element in the pair and the versioned value is the second element. Note that the iterator need not be threadsafe, and that it must be manually closed after use.

Returns:
An iterator over the entries in this StorageEngine.

keys

ClosableIterator<K> keys()
Get an iterator over keys in the store. Note that the iterator need not be threadsafe, and that it must be manually closed after use.

Returns:
An iterator over the keys in this StorageEngine.

truncate

void truncate()
Truncate all entries in the store



Jay Kreps