1 package org.ldk.structs;
3 import org.ldk.impl.bindings;
4 import org.ldk.enums.*;
6 import java.util.Arrays;
7 import java.lang.ref.Reference;
8 import javax.annotation.Nullable;
12 * A locked `MultiThreadedLockableScore`.
14 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
15 public class MultiThreadedScoreLock extends CommonBase {
16 MultiThreadedScoreLock(Object _dummy, long ptr) { super(ptr); }
17 @Override @SuppressWarnings("deprecation")
18 protected void finalize() throws Throwable {
20 if (ptr != 0) { bindings.MultiThreadedScoreLock_free(ptr); }
24 * Serialize the MultiThreadedScoreLock object into a byte array which can be read by MultiThreadedScoreLock_read
26 public byte[] write() {
27 byte[] ret = bindings.MultiThreadedScoreLock_write(this.ptr);
28 Reference.reachabilityFence(this);
33 * Constructs a new Score which calls the relevant methods on this_arg.
34 * This copies the `inner` pointer in this_arg and thus the returned Score must be freed before this_arg is
36 public Score as_Score() {
37 long ret = bindings.MultiThreadedScoreLock_as_Score(this.ptr);
38 Reference.reachabilityFence(this);
39 if (ret >= 0 && ret <= 4096) { return null; }
40 Score ret_hu_conv = new Score(null, ret);
41 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.add(this); };