public final class Ffi extends Object
| Constructor and Description |
|---|
Ffi() |
| Modifier and Type | Method and Description |
|---|---|
static void |
compact(int numberOfReindexingPhasesBeforeFullSet,
MasterKeys masterKeys,
byte[] label,
FfiWrapper.FetchEntryCallback fetchEntry,
FfiWrapper.FetchChainCallback fetchChain,
FfiWrapper.FetchAllEntryCallback fetchAllEntry,
FfiWrapper.UpdateLinesCallback updateLines,
FfiWrapper.ListRemovedLocationsCallback listRemovedLocations) |
static String |
get_last_error()
Return the last error in a String that does not exceed 1023 bytes
|
static String |
get_last_error(int maxLen)
Return the last error in a String that does not exceed `max_len` bytes
|
static void |
graph_upsert(MasterKeys masterKeys,
byte[] label,
HashMap<IndexedValue,Word[]> indexedValuesAndWords,
FfiWrapper.FetchEntryCallback fetchEntry,
FfiWrapper.UpsertEntryCallback upsertEntry,
FfiWrapper.UpsertChainCallback upsertChain) |
static List<byte[]> |
search(byte[] keyK,
byte[] label,
Word[] words,
int loopIterationLimit,
int maxDepth,
FfiWrapper.ProgressCallback progress,
FfiWrapper.FetchEntryCallback fetchEntry,
FfiWrapper.FetchChainCallback fetchChain) |
static void |
set_error(String error_msg)
Set the last error on the native lib
|
static void |
unwrap(int result)
If the result of the last FFI call is in Error, recover the last error from the native code and throw an
exception wrapping it.
|
static void |
upsert(MasterKeys masterKeys,
byte[] label,
HashMap<IndexedValue,Word[]> indexedValuesAndWords,
FfiWrapper.FetchEntryCallback fetchEntry,
FfiWrapper.UpsertEntryCallback upsertEntry,
FfiWrapper.UpsertChainCallback upsertChain) |
static int |
writeOutputPointerAndSize(HashMap<byte[],byte[]> uidsAndValues,
com.sun.jna.Pointer output,
com.sun.jna.ptr.IntByReference outputSize) |
public static String get_last_error() throws FfiException
FfiException - in case of native library errorpublic static String get_last_error(int maxLen) throws FfiException
maxLen - the maximum number of bytes to returnFfiException - in case of native library errorpublic static void set_error(String error_msg) throws FfiException
error_msg - the last error to set on the native libFfiException - n case of native library errorpublic static int writeOutputPointerAndSize(HashMap<byte[],byte[]> uidsAndValues, com.sun.jna.Pointer output, com.sun.jna.ptr.IntByReference outputSize)
public static void upsert(MasterKeys masterKeys, byte[] label, HashMap<IndexedValue,Word[]> indexedValuesAndWords, FfiWrapper.FetchEntryCallback fetchEntry, FfiWrapper.UpsertEntryCallback upsertEntry, FfiWrapper.UpsertChainCallback upsertChain) throws FfiException, CosmianException
FfiExceptionCosmianExceptionpublic static void graph_upsert(MasterKeys masterKeys, byte[] label, HashMap<IndexedValue,Word[]> indexedValuesAndWords, FfiWrapper.FetchEntryCallback fetchEntry, FfiWrapper.UpsertEntryCallback upsertEntry, FfiWrapper.UpsertChainCallback upsertChain) throws FfiException, CosmianException
FfiExceptionCosmianExceptionpublic static List<byte[]> search(byte[] keyK, byte[] label, Word[] words, int loopIterationLimit, int maxDepth, FfiWrapper.ProgressCallback progress, FfiWrapper.FetchEntryCallback fetchEntry, FfiWrapper.FetchChainCallback fetchChain) throws FfiException, CosmianException
FfiExceptionCosmianExceptionpublic static void compact(int numberOfReindexingPhasesBeforeFullSet,
MasterKeys masterKeys,
byte[] label,
FfiWrapper.FetchEntryCallback fetchEntry,
FfiWrapper.FetchChainCallback fetchChain,
FfiWrapper.FetchAllEntryCallback fetchAllEntry,
FfiWrapper.UpdateLinesCallback updateLines,
FfiWrapper.ListRemovedLocationsCallback listRemovedLocations)
throws FfiException,
CosmianException
FfiExceptionCosmianExceptionpublic static void unwrap(int result)
throws FfiException
result - the result of the FFI callFfiException - in case of native library errorCopyright © 2022. All rights reserved.