Skip to content

Commit

Permalink
Move Riak Conflict to its own file.
Browse files Browse the repository at this point in the history
  • Loading branch information
jnunemaker committed Oct 18, 2010
1 parent 7e4f649 commit ff2952f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
10 changes: 1 addition & 9 deletions lib/adapter/riak.rb
@@ -1,17 +1,9 @@
require 'adapter'
require 'adapter/riak/conflict'
require 'riak'

module Adapter
module Riak
class Conflict < StandardError
attr_reader :robject

def initialize(robject)
@robject = robject
super('Read conflict present')
end
end

# Optimize key? to do head request in riak instead of full key read and nil check
def key?(key)
client.exists?(key_for(key))
Expand Down
12 changes: 12 additions & 0 deletions lib/adapter/riak/conflict.rb
@@ -0,0 +1,12 @@
module Adapter
module Riak
class Conflict < StandardError
attr_reader :robject

def initialize(robject)
@robject = robject
super('Read conflict present')
end
end
end
end

0 comments on commit ff2952f

Please sign in to comment.