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: %% @doc Ping the server
  -spec ping(pid()) -> ok | {error, term()}.
  ping(Pid) ->
      gen_server:call(Pid, {req, rpbpingreq}).
  
  %% @doc Get the client id for this connection
  -spec get_client_id(pid()) -> {ok, client_id()} | {error, term()}.
  get_client_id(Pid) ->
      gen_server:call(Pid, {req, rpbgetclientidreq}).
  
  %% @doc Set the client id for this connection
  -spec set_client_id(pid(), client_id()) -> {ok, client_id()} | {error, term()}.
  set_client_id(Pid, ClientId) ->
      gen_server:call(Pid, {req, #rpbsetclientidreq{client_id = ClientId}}).
  
  %% @doc Get the server information for this connection
  -spec get_server_info(pid()) -> {ok, server_info()} | {error, term()}.
  get_server_info(Pid) ->
      gen_server:call(Pid, {req, rpbgetserverinforeq}).
  
  %% @doc Get bucket/key from the server
  %%      Will return {error, notfound} if the key is not on the server
  -spec get(pid(), bucket() | string(), key() | string()) -> {ok, riakc_obj()} | {error, term()}.
  get(Pid, Bucket, Key) ->
      get(Pid, Bucket, Key, []).
  
  %% @doc Get bucket/key from the server supplying options
  %%      [{r, 1}] would set r=1 for the request
  -spec get(pid(), bucket() | string(), key() | string(), riak_pbc_options()) ->
                   {ok, riakc_obj()} | {error, term()}.
  get(Pid, Bucket, Key, Options) ->
      Req = get_options(Options, #rpbgetreq{bucket = Bucket, key = Key}),
      gen_server:call(Pid, {req, Req}).
  
  %% @doc Put the metadata/value in the object under bucket/key
  -spec put(pid(), riakc_obj()) -> ok | {ok, riakc_obj()} | {error, term()}.
  put(Pid, Obj) ->
      put(Pid, Obj, []).
  
  %% @doc Put the metadata/value in the object under bucket/key with options
  %%      [{w,2}] sets w=2,
  
negative.code: %%      Put throws siblings if the riakc_obj contains siblings
  %%      that have not been resolved by calling select_sibling/2 or 
  %%      update_value/2 and update_metadata/2.
  put(Pid, Obj, Options) ->
      put(Pid, Obj, Options, default_timeout(put)).
  
  %% @doc Put the metadata/value in the object under bucket/key with options and timeout
  %%      [{w,2}] sets w=2,
  %%      [{dw,1}] set dw=1,
  %%      [{return_body, true}] returns the updated metadata/value
  %%      Put throws siblings if the riakc_obj contains siblings
  %%      that have not been resolved by calling select_sibling/2 or 
  %%      update_value/2 and update_metadata/2.
  -spec put(pid(), riakc_obj(), riak_pbc_options(), timeout()) -> 
                   ok | {ok, riakc_obj()} | {error, term()}.
  put(Pid, Obj, Options, Timeout) ->
      Content = riakc_pb:pbify_rpbcontent({riakc_obj:get_update_metadata(Obj),
                                           riakc_obj:get_update_value(Obj)}),
      Req = put_options(Options,
  