[DEADCODE] Clean up FileManager.java

This commit is contained in:
Julian Knutsen 2019-11-25 14:00:27 -08:00
parent 22080037ba
commit 1895802681
No known key found for this signature in database
GPG Key ID: D85F536DB3615B2D

View File

@ -94,17 +94,10 @@ public class FileManager<T extends PersistableEnvelope> {
// API
///////////////////////////////////////////////////////////////////////////////////////////
/**
* Actually write the wallet file to disk, using an atomic rename when possible. Runs on the current thread.
*/
public void saveNow(T persistable) {
saveNowInternal(persistable);
}
/**
* Queues up a save in the background. Useful for not very important wallet changes.
*/
public void saveLater(T persistable) {
void saveLater(T persistable) {
saveLater(persistable, delay);
}
@ -133,7 +126,7 @@ public class FileManager<T extends PersistableEnvelope> {
}
}
public synchronized void removeFile(String fileName) {
synchronized void removeFile(String fileName) {
File file = new File(dir, fileName);
boolean result = file.delete();
if (!result)
@ -154,7 +147,7 @@ public class FileManager<T extends PersistableEnvelope> {
/**
* Shut down auto-saving.
*/
void shutDown() {
private void shutDown() {
executor.shutdown();
try {
executor.awaitTermination(5, TimeUnit.SECONDS);
@ -174,11 +167,11 @@ public class FileManager<T extends PersistableEnvelope> {
FileUtil.renameFile(storageFile, corruptedFile);
}
public synchronized void removeAndBackupFile(String fileName) throws IOException {
synchronized void removeAndBackupFile(String fileName) throws IOException {
removeAndBackupFile(dir, storageFile, fileName, "backup_of_corrupted_data");
}
public synchronized void backupFile(String fileName, int numMaxBackupFiles) {
synchronized void backupFile(String fileName, int numMaxBackupFiles) {
FileUtil.rollingBackup(dir, fileName, numMaxBackupFiles);
}