class ToFileDumpProcessor {

    public static String toFileDump(SharedPageLockTrackerDump pageLockDump, File dir, String name) throws IgniteCheckedException {
        try {
            if (!dir.exists())
                dir.mkdirs();

            File file = new File(dir, PREFIX_NAME + name + "_" + DATE_FMT.format(new Date(pageLockDump.time)));

            return saveToFile(ToStringDumpHelper.toStringDump(pageLockDump), file);
        }
        catch (IOException e) {
            throw new IgniteCheckedException(e);
        }
    }

}