voldemort.store.views
Class AbstractViewTransformation<K,V,S,T>

java.lang.Object
  extended by voldemort.store.views.AbstractViewTransformation<K,V,S,T>
Type Parameters:
K - The type of the key
V - The type of objects in the view
S - The type of objects in the store
T - The type of transforms
All Implemented Interfaces:
View<K,V,S,T>

public class AbstractViewTransformation<K,V,S,T>
extends java.lang.Object
implements View<K,V,S,T>

A view that fails all operations. Override one of the methods to add either reads or writes.


Constructor Summary
AbstractViewTransformation()
           
 
Method Summary
 V storeToView(Store<K,S,T> store, K k, S s, T t)
          Translate from the store type to the view type
 S viewToStore(Store<K,S,T> store, K k, V v, T t)
          Translate from the view type to the store type
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractViewTransformation

public AbstractViewTransformation()
Method Detail

storeToView

public V storeToView(Store<K,S,T> store,
                     K k,
                     S s,
                     T t)
Description copied from interface: View
Translate from the store type to the view type

Specified by:
storeToView in interface View<K,V,S,T>
Parameters:
store - The store behind the view
k - The key
s - The value for the store
t - the transforms to be applied on s
Returns:
The value for the view

viewToStore

public S viewToStore(Store<K,S,T> store,
                     K k,
                     V v,
                     T t)
Description copied from interface: View
Translate from the view type to the store type

Specified by:
viewToStore in interface View<K,V,S,T>
Parameters:
store - The store behind the view
k - The key
v - The value
t - the transforms to be applied on v
Returns:
The store type


Jay Kreps, Roshan Sumbaly, Alex Feinberg, Bhupesh Bansal, Lei Gao, Chinmay Soman, Vinoth Chandar, Zhongjie Wu