anchor.diff:              {threshold, integer}
           ]}}
       ]}.
  +%%-------------------------------------------------------------------
  +%% @private
  +%% @doc
  +%% Returns links tree root for given space.
  +%% @end
  +%%-------------------------------------------------------------------
  +-spec space_link_root(od_space:id()) -> binary().
  +space_link_root(SpaceId) ->
  +    <<?LINK_PREFIX/binary, SpaceId/binary>>.
  
positive.code:     AccIn :: term()) -> {ok, Acc :: term()} | {error, term()}.
  for_each_autocleaning(SpaceId, Callback, AccIn) ->
      Ctx = ?CTX#{scope => SpaceId},
      datastore_model:fold_links(Ctx, ?LINK, all, fun(#link{name = Name}, Acc) ->
          {ok, Callback(Name, Acc)}
      end, AccIn, #{}).
  
  
negative.code: remove_link(AutocleaningId, SpaceId) ->
      Ctx = ?CTX#{scope => SpaceId},
      TreeId = oneprovider:get_provider_id(),
      ok = datastore_model:delete_links(Ctx, space_link_root(SpaceId), TreeId, AutocleaningId).
  
  %%-------------------------------------------------------------------
  %% @doc
  