com.basho.riak.client.cap
Interface Mutation<T>

All Known Implementing Classes:
ClobberMutation

public interface Mutation<T>

A Mutation is some encapsulated logic that generates a new value from some previous value

Big thanks to Coda Hale from Yammer for this. Modelling your data as logically monotonic makes store operations more predictable in a distributed environment. Basically changing data *based on its contents* and your logic. As the simplest example: Rather than creating a riak object with a value of (say 25) you create a Mutation that adds 1 to whatever value comes from Riak

Author:
russell

Method Summary
 T apply(T original)
          Applies a mutation to the original value passed in
 

Method Detail

apply

T apply(T original)
Applies a mutation to the original value passed in

Parameters:
original - the value to mutate.
Returns:
the mutated value.


Copyright © 2012. All Rights Reserved.