package com.atlassian.bitbucket.mesh.repository;

import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import java.nio.file.Path;

/**
 * Represents the {@code shared-objects} repository that backs all {@link ManagedRepository managed repositories} in
 * a repository hierarchy.
 */
public interface SharedObjectsRepository extends Repository {

    @Nonnull
    Path getDirtyMarker(@Nonnull ManagedRepository member);

    /**
     * @since 2.0.14, 2.1.8, 2.2.0
     */
    @Nonnull
    String getHierarchyId();

    @Nullable
    ManagedRepository getMember(@Nonnull String localId);

    @Nonnull
    String getPartition();

    @Nonnull
    Path getReflogDir(@Nonnull ManagedRepository member);
}
