class VanillaDataCache implements Closeable {

    public int findNextDataCount(int cycle, int threadId) throws IOException {
        final String cycleStr = dateCache.formatFor(cycle);
        final String cyclePath = basePath + "/" + cycleStr;
        final String dataPrefix = FILE_NAME_PREFIX + threadId + "-";

        int maxCount = -1;
        final File[] files = new File(cyclePath).listFiles();
        if (files != null) {
            for (File file : files) {
                if (file.getName().startsWith(dataPrefix)) {
                    final int count = Integer.parseInt(file.getName().substring(dataPrefix.length()));
                    if (maxCount < count)
                        maxCount = count;
                }
            }
        }
        // Move to the next data file
        return maxCount + 1;
    }

    public  VanillaDataCache(@NotNull String basePath, int blockBits, @NotNull DateCache dateCache);
    public  VanillaDataCache(@NotNull String basePath, int blockBits, @NotNull DateCache dateCache, @NotNull VanillaChronicleConfig config);
    public  VanillaDataCache(@NotNull String basePath, int blockBits, @NotNull DateCache dateCache, int capacity);
    public  VanillaDataCache(@NotNull String basePath, int blockBits, @NotNull DateCache dateCache, int capacity, boolean cleanupOnClose);

}