anchor.diff:            end
       end,
   
  +
     case lists:all(fun(X) -> X == local_write end, AnalyticsResult) of 
       true ->
         (State#state.backend_mod):write(State#state.backend_ref, PatchedActions);
  
positive.code:           end
        end
    end,
  
    {noreply, State};
  
  handle_cast({db_put, Destination, EdisItem}, State) ->
    EdisItemLocal = (State#state.backend_mod):get(State#state.backend_ref, Destination),
  
negative.code:           end
        end
    end,
    {noreply, stamp(Destination, write, State)};
  
  
  handle_cast({db_update, Key, EdisItem}, State) ->
    EdisItemLocal = (State#state.backend_mod):get(State#state.backend_ref, Key),
      case {EdisItemLocal,EdisItem} of
        {not_found,not_found} ->
          {noreply, stamp(Key, read, State)}; 
      _ -> 
        case {EdisItemLocal,EdisItem} of
          {not_found,#edis_item{}} ->
            db_delete(Key, EdisItem, State),
            {noreply, stamp(Key, write, State)};
          _ ->
            case EdisItemLocal of
              #edis_item{}  ->
                db_put(Key, EdisItemLocal, State),
                {noreply, stamp(Key, write, State)};
              _ ->
                {noreply, stamp(Key, read, State)}
            end
        end
    end.
  