Package org.ldk.structs
Class FilesystemPersister
- java.lang.Object
-
- org.ldk.structs.FilesystemPersister
-
public class FilesystemPersister extends Object
FilesystemPersister persists channel data on disk, where each channel's data is stored in a file named after its funding outpoint. Warning: this module does the best it can with calls to persist data, but it can only guarantee that the data is passed to the drive. It is up to the drive manufacturers to do the actual persistence properly, which they often don't (especially on consumer-grade hardware). Therefore, it is up to the user to validate their entire storage stack, to ensure the writes are persistent. Corollary: especially when dealing with larger amounts of money, it is best practice to have multiple channel data backups and not rely only on one FilesystemPersister.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
finalize()
String
get_data_dir()
Get the directory which was provided when this persister was initialized.static FilesystemPersister
of(String path_to_channel_data)
Initialize a new FilesystemPersister and set the path to the individual channels' files.Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ
read_channelmonitors(EntropySource entropy_source, SignerProvider signer_provider)
Read `ChannelMonitor`s from disk.
-
-
-
Method Detail
-
finalize
protected void finalize() throws Throwable
-
of
public static FilesystemPersister of(String path_to_channel_data)
Initialize a new FilesystemPersister and set the path to the individual channels' files.
-
get_data_dir
public String get_data_dir()
Get the directory which was provided when this persister was initialized.
-
read_channelmonitors
public Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ read_channelmonitors(EntropySource entropy_source, SignerProvider signer_provider)
Read `ChannelMonitor`s from disk.
-
-