/*
 * Copyright 2016 higherfrequencytrading.com
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package net.openhft.chronicle.queue;

import net.openhft.chronicle.core.time.TimeProvider;

public interface RollCycle {

    String format();

    int length();

    int defaultIndexCount();

    int defaultIndexSpacing();

    /**
     * @param epoch and EPOCH offset, to all the user to define their own epoch
     * @return the cycle
     */
    int current(TimeProvider time, long epoch);

    long toIndex(int cycle, long sequenceNumber);

    long toSequenceNumber(long index);

    int toCycle(long index);
}

@@ -733,367 +733,2527 @@
     
-String format();%0A%0A    int length();%0A%0A    int defaultIndexCount();%0A%0A    int defaultIndexSpacing();%0A%0A    /**%0A     * @param epoch and EPOCH offset, to all the user to define their own epoch%0A     * @return the cycle%0A     */%0A    int current(TimeProvider time, long epoch);%0A%0A    long toIndex(int cycle, long sequenceNumber);%0A%0A    long toSequenceNumber(long index);%0A
+/**%0A     * Returns the format that is to be applied when file names%0A     * are calculated for a new roll cycle.%0A     * %3Cp%3E%0A     * For example, the following formats can be returned:%0A     * %3Cul%3E%0A     *     %3Cli%3E%22yyyyMMdd-HHmm%22 (MINUTELY)%3C/li%3E%0A     *     %3Cli%3E%22yyyyMMdd%22 (DAILY)%3C/li%3E%0A     * %3C/ul%3E%0A     *%0A     * @return the format that is to be applied when file names%0A     *         are calculated for a new roll cycle%0A     */%0A    String format();%0A%0A    /**%0A     * Returns the length in milliseconds (i.e. the maximum duration) for a roll cycle.%0A     * %3Cp%3E%0A     * For example, the following lengths can be returned:%0A     * %3Cul%3E%0A     *     %3Cli%3E60 * 1,000 = 60,000 (MINUTELY)%3C/li%3E%0A     *     %3Cli%3E24 * 60 * 60 * 1,000 = 86,400,000 (DAILY)%3C/li%3E%0A     * %3C/ul%3E%0A     *%0A     * @return the length in milliseconds (i.e. the maximum duration) for a roll cycle%0A     */%0A    int length();%0A%0A    int defaultIndexCount();%0A%0A    int defaultIndexSpacing();%0A%0A    /**%0A     * @param epoch and EPOCH offset, to all the user to define their own epoch%0A     * @return the cycle%0A     */%0A    int current(TimeProvider time, long epoch);%0A%0A    /**%0A     * Returns the index for the given %7B@code cycle%7D and %7B@code sequenceNumber%7D.%0A     * %3Cp%3E%0A     * An index is comprised of both a cycle and a sequence number but%0A     * the way the index is composed of said properties may vary.%0A     *%0A     * @param cycle to be composed into an index%0A     * @param sequenceNumber to be composed into an index%0A     * @return the index for the given %7B@code cycle%7D and %7B@code sequenceNumber%7D%0A     */%0A    long toIndex(int cycle, long sequenceNumber);%0A%0A    /**%0A     * Returns the sequence number for the given %7B@code index%7D.%0A     * %3Cp%3E%0A     * An index is comprised of both a cycle and a sequence number but%0A     * the way the index is composed of said properties may vary.%0A     * This method decomposes the provided %7B@code index%7D and extracts%0A     * the sequence number.%0A     *%0A     * @param index to use when extracting the sequence number%0A     * @return the sequence number for the given %7B@code index%7D%0A     */%0A    long toSequenceNumber(long index);%0A%0A    /**%0A     * Returns the cycle for the given %7B@code index%7D.%0A     * %3Cp%3E%0A     * An index is comprised of both a cycle and a sequence number but%0A     * the way the index is composed of said properties may vary.%0A     * This method decomposes the provided %7B@code index%7D and extracts%0A     * the cycle.%0A     *%0A     * @param index to use when extracting the cycle%0A     * @return the sequence number for the given %7B@code index%7D%0A     */
 %0A   

Improve JavaDoc for RollCycle