// AUTOGENERATED FILE - DO NOT MODIFY!
// This file generated by Djinni from libunity.djinni

package com.gulden.jniunifiedbackend;

import java.util.concurrent.atomic.AtomicBoolean;

/** C++ interface to control generation of blocks (proof of work) */
public abstract class IGenerationController {
    /** Register listener to be notified of generation related events */
    public static void setListener(IGenerationListener generationListener)
    {
        CppProxy.setListener(generationListener);
    }

    /**
     * Activate block generation (proof of work)
     * Number of threads should not exceed physical threads, memory limit is a string specifier in the form of #B/#K/#M/#G (e.g. 102400B, 10240K, 1024M, 1G)
     */
    public static boolean startGeneration(int numThreads, String memoryLimit)
    {
        return CppProxy.startGeneration(numThreads,
                                        memoryLimit);
    }

    /** Stop any active block generation (proof of work) */
    public static boolean stopGeneration()
    {
        return CppProxy.stopGeneration();
    }

    /**
     * Get the address of the account that is used for generation by default. Empty on failiure
     * Note that this isn't necessarily the actual generation address as there might be an override
     * See: getGenerationOverrideAddress
     */
    public static String getGenerationAddress()
    {
        return CppProxy.getGenerationAddress();
    }

    /**
     * Get the 'override' address for generation, if one has been set
     * The override address, when present it used for all block generation in place of the default account address
     */
    public static String getGenerationOverrideAddress()
    {
        return CppProxy.getGenerationOverrideAddress();
    }

    /** Set an override address to use for block generation in place of the default */
    public static boolean setGenerationOverrideAddress(String overrideAddress)
    {
        return CppProxy.setGenerationOverrideAddress(overrideAddress);
    }

    public static long getAvailableCores()
    {
        return CppProxy.getAvailableCores();
    }

    public static long getMinimumMemory()
    {
        return CppProxy.getMinimumMemory();
    }

    public static long getMaximumMemory()
    {
        return CppProxy.getMaximumMemory();
    }

    private static final class CppProxy extends IGenerationController
    {
        private final long nativeRef;
        private final AtomicBoolean destroyed = new AtomicBoolean(false);

        private CppProxy(long nativeRef)
        {
            if (nativeRef == 0) throw new RuntimeException("nativeRef is zero");
            this.nativeRef = nativeRef;
        }

        private native void nativeDestroy(long nativeRef);
        public void _djinni_private_destroy()
        {
            boolean destroyed = this.destroyed.getAndSet(true);
            if (!destroyed) nativeDestroy(this.nativeRef);
        }
        protected void finalize() throws java.lang.Throwable
        {
            _djinni_private_destroy();
            super.finalize();
        }

        public static native void setListener(IGenerationListener generationListener);

        public static native boolean startGeneration(int numThreads, String memoryLimit);

        public static native boolean stopGeneration();

        public static native String getGenerationAddress();

        public static native String getGenerationOverrideAddress();

        public static native boolean setGenerationOverrideAddress(String overrideAddress);

        public static native long getAvailableCores();

        public static native long getMinimumMemory();

        public static native long getMaximumMemory();
    }
}

@@ -774,32 +774,53 @@
 (int numThreads,
+ int numArenaThreads,
  String memoryLi
@@ -882,16 +882,73 @@
 hreads,%0A
+                                        numArenaThreads,%0A
         
@@ -3314,32 +3314,53 @@
 (int numThreads,
+ int numArenaThreads,
  String memoryLi

Add generated file update that was missed from prior commit