voldemort.store
Interface StorageEngine<K,V,T>

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

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

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.
 boolean isPartitionAware()
          Is the data persistence aware of partitions? In other words is the data internally stored on a per partition basis or together
 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


isPartitionAware

boolean isPartitionAware()
Is the data persistence aware of partitions? In other words is the data internally stored on a per partition basis or together

Returns:
Boolean indicating if the data persistence is partition aware


Jay Kreps, Roshan Sumbaly, Alex Feinberg, Bhupesh Bansal, Lei Gao