package anastore.store;

import anastore.util.Pair;
import anastore.util.TimeRange;

/**
 * A handler for cache misses.
 */
public interface MissHandler<D extends Storable>
{
    /**
     * Retrieve the specified version of the specified datum, and its
     * time range.  The returned time range must contain timestamp.
     */
    public Pair<TimeRange, D> get(long id, long timestamp)
        throws NoSuchDatum;

    /**
     * Retrieve the specified version of the specified datum, and its
     * time range.  The returned time range must be unbounded.
     */
    public Pair<TimeRange, D> getLatest(long id)
        throws NoSuchDatum;
}
