import org.ldk.enums.*;
import org.ldk.util.*;
import java.util.Arrays;
+import java.lang.ref.Reference;
import javax.annotation.Nullable;
*/
public static FilesystemPersister of(java.lang.String path_to_channel_data) {
long ret = bindings.FilesystemPersister_new(path_to_channel_data);
+ Reference.reachabilityFence(path_to_channel_data);
if (ret >= 0 && ret <= 4096) { return null; }
- FilesystemPersister ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new FilesystemPersister(null, ret); }
- ret_hu_conv.ptrs_to.add(ret_hu_conv);
+ org.ldk.structs.FilesystemPersister ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.FilesystemPersister(null, ret); }
+ if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(ret_hu_conv); };
return ret_hu_conv;
}
*/
public String get_data_dir() {
String ret = bindings.FilesystemPersister_get_data_dir(this.ptr);
+ Reference.reachabilityFence(this);
return ret;
}
*/
public Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ read_channelmonitors(KeysInterface keys_manager) {
long ret = bindings.FilesystemPersister_read_channelmonitors(this.ptr, keys_manager == null ? 0 : keys_manager.ptr);
+ Reference.reachabilityFence(this);
+ Reference.reachabilityFence(keys_manager);
if (ret >= 0 && ret <= 4096) { return null; }
Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ ret_hu_conv = Result_CVec_C2Tuple_BlockHashChannelMonitorZZErrorZ.constr_from_ptr(ret);
- this.ptrs_to.add(keys_manager);
- return ret_hu_conv;
- }
-
- /**
- * Constructs a new Persist which calls the relevant methods on this_arg.
- * This copies the `inner` pointer in this_arg and thus the returned Persist must be freed before this_arg is
- */
- public Persist as_Persist() {
- long ret = bindings.FilesystemPersister_as_Persist(this.ptr);
- if (ret >= 0 && ret <= 4096) { return null; }
- Persist ret_hu_conv = new Persist(null, ret);
- ret_hu_conv.ptrs_to.add(this);
+ if (this != null) { this.ptrs_to.add(keys_manager); };
return ret_hu_conv;
}