voldemort.versioning
Class ArbitraryInconsistencyResolver<T>

java.lang.Object
  extended by voldemort.versioning.ArbitraryInconsistencyResolver<T>
All Implemented Interfaces:
InconsistencyResolver<T>

public class ArbitraryInconsistencyResolver<T>
extends java.lang.Object
implements InconsistencyResolver<T>

An inconsistency resolution strategy that always prefers the first of the two objects.


Constructor Summary
ArbitraryInconsistencyResolver()
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
 int hashCode()
           
 java.util.List<T> resolveConflicts(java.util.List<T> values)
          Arbitrarily resolve the inconsistency by choosing the first object if there is one.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArbitraryInconsistencyResolver

public ArbitraryInconsistencyResolver()
Method Detail

resolveConflicts

public java.util.List<T> resolveConflicts(java.util.List<T> values)
Arbitrarily resolve the inconsistency by choosing the first object if there is one.

Specified by:
resolveConflicts in interface InconsistencyResolver<T>
Parameters:
values - The list of objects
Returns:
A single value, if one exists, taken from the input list.

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object


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