public final class CommitLogUtil extends Object
CommitLogProcessor to compare/delete commit log files.| Modifier and Type | Field and Description |
|---|---|
private static Pattern |
FILENAME_REGEX_PATTERN |
private static org.slf4j.Logger |
LOGGER |
| Modifier | Constructor and Description |
|---|---|
private |
CommitLogUtil() |
| Modifier and Type | Method and Description |
|---|---|
static int |
compareCommitLogs(File file1,
File file2)
Comparing two commit log files provided the
File instances;
Returns 0 if they are the same, -1 if first file is older, 1 if first file is newer. |
static int |
compareCommitLogs(String filename1,
String filename2)
Comparing two commit log files provided the file names.
|
static void |
deleteCommitLog(File file)
Delete a commit log and logs the error in the case the deletion failed.
|
private static long |
extractTimestamp(String commitLogFileName) |
static File[] |
getCommitLogs(File directory)
Given a directory, return an array of commit logs in this directory.
|
static void |
moveCommitLog(File file,
Path toDir)
Move a commit log to a new directory.
|
private static final org.slf4j.Logger LOGGER
private static final Pattern FILENAME_REGEX_PATTERN
public static void moveCommitLog(File file, Path toDir)
public static void deleteCommitLog(File file)
public static File[] getCommitLogs(File directory)
public static int compareCommitLogs(File file1, File file2)
File instances;
Returns 0 if they are the same, -1 if first file is older, 1 if first file is newer.public static int compareCommitLogs(String filename1, String filename2)
private static long extractTimestamp(String commitLogFileName)
Copyright © 2020 JBoss by Red Hat. All rights reserved.