Package org.ldk.structs
Class Persister
- java.lang.Object
-
- org.ldk.structs.Persister
-
public class Persister extends Object
Trait that handles persisting a [`ChannelManager`], [`NetworkGraph`], and [`WriteableScore`] to disk.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
Persister.PersisterInterface
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
destroy()
Destroys the object, freeing associated resources.protected void
finalize()
static Persister
new_impl(Persister.PersisterInterface arg)
Result_NoneErrorZ
persist_graph(NetworkGraph network_graph)
Persist the given [`NetworkGraph`] to disk, returning an error if persistence failed.Result_NoneErrorZ
persist_manager(ChannelManager channel_manager)
Persist the given ['ChannelManager'] to disk, returning an error if persistence failed.Result_NoneErrorZ
persist_scorer(WriteableScore scorer)
Persist the given [`WriteableScore`] to disk, returning an error if persistence failed.
-
-
-
Method Detail
-
finalize
protected void finalize() throws Throwable
-
destroy
public void destroy()
Destroys the object, freeing associated resources. After this call, any access to this object may result in a SEGFAULT or worse. You should generally NEVER call this method. You should let the garbage collector do this for you when it finalizes objects. However, it may be useful for types which represent locks and should be closed immediately to avoid holding locks until the GC runs.
-
new_impl
public static Persister new_impl(Persister.PersisterInterface arg)
-
persist_manager
public Result_NoneErrorZ persist_manager(ChannelManager channel_manager)
Persist the given ['ChannelManager'] to disk, returning an error if persistence failed.
-
persist_graph
public Result_NoneErrorZ persist_graph(NetworkGraph network_graph)
Persist the given [`NetworkGraph`] to disk, returning an error if persistence failed.
-
persist_scorer
public Result_NoneErrorZ persist_scorer(WriteableScore scorer)
Persist the given [`WriteableScore`] to disk, returning an error if persistence failed.
-
-