anchor.diff:  
   %% @doc Management of keylists for Riak buckets.
   -module(riak_bucketkeys).
  --behavior(gen_fsm).
  -
  --export([start_link/0]).
  --export([init/1,waiting/2,terminate/3]).
  --export([code_change/4,handle_event/3,handle_info/3,handle_sync_event/4]).
  --export([put_key/2,get_keys/1,del_key/2]).
  +-behavior(gen_server2).
  +
  +-export([put_key/2,
  +         del_key/2,
  +         get_keys/1]).
  +-export([start_link/0,
  +         init/1,
  +         handle_call/3,
  +         handle_cast/2,
  +         handle_info/2,
  +         code_change/3,
  +         terminate/2]).
   
   -define(BUCK, ' bucketkeys').
   -define(QSIZE, 1000).
   -define(NFRAGS, 1024).
   -define(FLUSH_INTERVAL, 1000).
  --record(state, {ops, ring}).
  +-record(state, {ops, ring, tref}).
   
   % State.ops is a dict, keys are bucketname atoms, vals are lists of operations,
   % where operations are tuples of {Op::[add|del], riak_object:key()}
  
positive.code: ensure_ring(State) -> State.
  
  %% @private
  terminate(_,_,_) -> ok.
  
  %% @private
  code_change(_OldVsn, StateName, State, _Extra) -> {ok, StateName, State}.
  
  %% @private
  handle_event(_, _, StateData) -> {stop,badmsg,StateData}.
  
  %% @private
  handle_sync_event(_, _, _, StateData) -> {stop,badmsg,StateData}.
  
  %% @private
  handle_info({set_ring, Ring}, StateName, State) -> 
      {next_state, StateName, State#state{ring=Ring}, ?FLUSH_INTERVAL};
  handle_info(_, _, StateData) -> {stop,badmsg,StateData}.
  
negative.code: %% @private 
  all_frags(Bucket) when is_atom(Bucket) ->
      [atom_to_list(Bucket) ++ "-" ++ X || X <- [integer_to_list(I) || 
                                                 I <- lists:seq(0, ?NFRAGS-1)]].
  %% @private
  ensure_ring(State=#state{ring=undefined}) ->
      riak_ring_manager:subscribe(self()),
  