public class WalletFiles extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
WalletFiles.Listener
Implementors can do pre/post treatment of the wallet file.
|
| Constructor and Description |
|---|
WalletFiles(Wallet wallet,
File file,
long delay,
TimeUnit delayTimeUnit)
Initialize atomic and optionally delayed writing of the wallet file to disk.
|
| Modifier and Type | Method and Description |
|---|---|
void |
saveLater()
Queues up a save in the background.
|
void |
saveNow()
Actually write the wallet file to disk, using an atomic rename when possible.
|
void |
setListener(WalletFiles.Listener listener)
The given listener will be called on the autosave thread before and after the wallet is saved to disk.
|
void |
shutdownAndWait()
Shut down auto-saving.
|
public WalletFiles(Wallet wallet, File file, long delay, TimeUnit delayTimeUnit)
Wallet calls saveNow() or saveLater() as wallet state changes,
depending on the urgency of the changes.public void setListener(@Nonnull WalletFiles.Listener listener)
public void saveNow()
throws IOException
IOExceptionpublic void saveLater()
public void shutdownAndWait()
Copyright © 2016. All rights reserved.