Method: Riak::RObject.on_conflict

Defined in:
lib/riak/robject.rb

.on_conflict {|robject| ... } ⇒ Object

Note:

Ripple registers its own document-level conflict handler, so if you’re using ripple, you will probably want to use that instead.

Defines a callback to be invoked when there is conflict.

Yields:

  • The conflict callback.

Yield Parameters:

  • robject (RObject)

    The conflicted RObject

Yield Returns:

  • (RObject, nil)

    Either the resolved RObject or nil if your callback cannot resolve it. The next registered callback will be given the chance to resolve it.



50
51
52
# File 'lib/riak/robject.rb', line 50

def self.on_conflict(&conflict_hook)
  on_conflict_hooks << conflict_hook
end