anchor.diff:      end.
   
   %% @private
  -handle_call({req, Req}, From, State) when State#state.req =/= undefined ->
  +handle_call({req, Req, _Timeout}, From, State) when State#state.req =/= undefined ->
       {noreply, queue_request(Req, undefined, From, State)};
  -handle_call({req, Req, Ctx}, From, State) when State#state.req =/= undefined ->
  +handle_call({req, Req, _Timeout, Ctx}, From, State) when State#state.req =/= undefined ->
       {noreply, queue_request(Req, Ctx, From, State)};
  -handle_call({req, Req}, From, State) ->
  +handle_call({req, Req, _Timeout}, From, State) ->
       {noreply, send_request(Req, undefined, From, State)};
  -handle_call({req, Req, Ctx}, From, State) ->
  +handle_call({req, Req, _Timeout, Ctx}, From, State) ->
       {noreply, send_request(Req, Ctx, From, State)}.
   
   %% @private
  
positive.code:                                  key = riakc_obj:key(Obj),
                                   vclock = riakc_obj:vclock(Obj),
                                   content = Content}),
      gen_server:call(Pid, {req, Req}).
  
  %% @doc Delete the key/value
  -spec delete(pid(), bucket() | string(), key() | string()) -> ok | {error, term()}.
  delete(Pid, Bucket, Key) ->
      delete(Pid, Bucket, Key, []).
  
  %% @doc Delete the key/value with options
  %%      [{rw,2}] sets rw=2
  -spec delete(pid(), bucket() | string(), key() | string(), riak_pbc_options()) ->
                      ok | {error, term()}.
  delete(Pid, Bucket, Key, Options) ->
      Req = delete_options(Options, #rpbdelreq{bucket = Bucket, key = Key}),
      gen_server:call(Pid, {req, Req}).
  
  %% @doc List all buckets on the server
  -spec list_buckets(pid()) -> {ok, [bucket()]} | {error, term()}.
  list_buckets(Pid) ->
      gen_server:call(Pid, {req, rpblistbucketsreq}).
  
  %% @doc List all keys in a bucket
  -spec list_keys(pid(), bucket()) -> {ok, [key()]}.
  list_keys(Pid, Bucket) ->
      {ok, ReqId} = stream_list_keys(Pid, Bucket),
      wait_for_listkeys(ReqId, ?DEFAULT_TIMEOUT).
  
  %% @doc Stream list of keys in the bucket to the calling process.  The
  %%      process receives these messages.
  
negative.code: %%        {ReqId, done}
  -spec stream_list_keys(pid(), bucket()) -> {ok, req_id()} | {error, term()}.
  stream_list_keys(Pid, Bucket) ->
      stream_list_keys(Pid, Bucket, default_timeout(stream_list_keys)).
  
  %% @doc Stream list of keys in the bucket to the calling process specifying timeout.
  %%      The process receives these messages.
  %%        {ReqId, {keys, [key()]}}
  %%        {ReqId, done}
  -spec stream_list_keys(pid(), bucket(), timeout()) -> {ok, req_id()} | {error, term()}.
  stream_list_keys(Pid, Bucket, Timeout) ->
      ReqMsg = #rpblistkeysreq{bucket = Bucket},
      ReqId = mk_reqid(),
      gen_server:call(Pid, {req, ReqMsg, Timeout, {ReqId, self()}}).
  
  %% @doc Get bucket properties
  -spec get_bucket(pid(), bucket()) -> {ok, bucket_props()} | {error, term()}.
  get_bucket(Pid, Bucket) ->
      get_bucket(Pid, Bucket, default_timeout(get_bucket)).
  
  %% @doc Get bucket properties specifying a timeout
  -spec get_bucket(pid(), bucket(), timeout()) -> {ok, bucket_props()} | {error, term()}.
  get_bucket(Pid, Bucket, Timeout) ->
      Req = #rpbgetbucketreq{bucket = Bucket},
      gen_server:call(Pid, {req, Req, Timeout}).
  
  %% @doc Set bucket properties
  -spec set_bucket(pid(), bucket(), bucket_props()) -> ok | {error, term()}.
  set_bucket(Pid, Bucket, BucketProps) ->
      set_bucket(Pid, Bucket, BucketProps, default_timeout(set_bucket)).
  
  %% @doc Set bucket properties specifying a timeout
  -spec set_bucket(pid(), bucket(), bucket_props(), timeout()) -> ok | {error, term()}.
  set_bucket(Pid, Bucket, BucketProps, Timeout) ->
      PbProps = riakc_pb:pbify_rpbbucketprops(BucketProps),
      Req = #rpbsetbucketreq{bucket = Bucket, props = PbProps},
      gen_server:call(Pid, {req, Req, Timeout}).
  
  %% @spec mapred(Pid :: pid(),
  %%              Inputs :: list(),
  