voldemort.store.versioned
Class VersionIncrementingStore<K,V,T>

java.lang.Object
  extended by voldemort.store.AbstractStore<K,V,T>
      extended by voldemort.store.DelegatingStore<K,V,T>
          extended by voldemort.store.versioned.VersionIncrementingStore<K,V,T>
Type Parameters:
K - The key type
V - The value type
T - The transforms type
All Implemented Interfaces:
Store<K,V,T>

public class VersionIncrementingStore<K,V,T>
extends DelegatingStore<K,V,T>

A wrapper that increments the version on the value for puts and delegates all other operations


Constructor Summary
VersionIncrementingStore(Store<K,V,T> innerStore, int nodeId, Time time)
           
 
Method Summary
 java.lang.Object getCapability(StoreCapabilityType capability)
          Get some capability of the store.
 void put(K key, Versioned<V> value, T transforms)
          Associate the value with the key and version in this store
 
Methods inherited from class voldemort.store.DelegatingStore
close, delete, delete, get, get, getAll, getAll, getInnerStore, getVersions, put, toString
 
Methods inherited from class voldemort.store.AbstractStore
getName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VersionIncrementingStore

public VersionIncrementingStore(Store<K,V,T> innerStore,
                                int nodeId,
                                Time time)
Method Detail

put

public void put(K key,
                Versioned<V> value,
                T transforms)
         throws VoldemortException
Description copied from interface: Store
Associate the value with the key and version in this store

Specified by:
put in interface Store<K,V,T>
Overrides:
put in class DelegatingStore<K,V,T>
Parameters:
key - The key to use
value - The value to store and its version.
Throws:
VoldemortException

getCapability

public java.lang.Object getCapability(StoreCapabilityType capability)
Description copied from interface: Store
Get some capability of the store. Examples would be the serializer used, or the routing strategy. This provides a mechanism to verify that the store hierarchy has some set of capabilities without knowing the precise layering.

Specified by:
getCapability in interface Store<K,V,T>
Overrides:
getCapability in class DelegatingStore<K,V,T>
Parameters:
capability - The capability type to retrieve
Returns:
The given capaiblity


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