package com.atlassian.bitbucket.mesh.repository;

import javax.annotation.Nonnull;
import java.time.Instant;

import static java.lang.String.format;

public interface WorkTree extends Repository {

    @Nonnull
    static String formatId(long subId) {
        return format("wt/%d", subId);
    }

    @Nonnull
    Instant getExpiry();

    /**
     * @return ID that identifies the work tree on the local node
     */
    long getLocalId();

    @Nonnull
    Repository getRepository();

    boolean hasAlternates();

    boolean isExpired();
}
