-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
86 changed files
with
15,408 additions
and
18,428 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,92 +1,63 @@ | ||
/********************************************************************************** | ||
© Copyright Senzing, Inc. 2021 | ||
The source code for this program is not published or otherwise divested | ||
of its trade secrets, irrespective of what has been deposited with the U.S. | ||
Copyright Office. | ||
**********************************************************************************/ | ||
* © Copyright Senzing, Inc. 2021 | ||
* The source code for this program is not published or otherwise divested | ||
* of its trade secrets, irrespective of what has been deposited with the U.S. | ||
* Copyright Office. | ||
**********************************************************************************/ | ||
|
||
package com.senzing.g2.engine; | ||
|
||
/** | ||
* Implements the {@link NativeConfig} interface to call the native implementations | ||
* of the functions. | ||
* Implements the {@link NativeConfig} interface to call the native implementations of the | ||
* functions. | ||
*/ | ||
class G2ConfigJNI implements NativeConfig { | ||
static { | ||
System.loadLibrary("G2"); | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
/** {@inheritDoc} */ | ||
@Override | ||
public native int init(String instanceName, | ||
String settings, | ||
boolean verboseLogging); | ||
public native int init(String instanceName, String settings, boolean verboseLogging); | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
/** {@inheritDoc} */ | ||
@Override | ||
public native int destroy(); | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
/** {@inheritDoc} */ | ||
@Override | ||
public native int create(Result<Long> configHandle); | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
/** {@inheritDoc} */ | ||
@Override | ||
public native int load(String jsonConfig, Result<Long> configHandle); | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
/** {@inheritDoc} */ | ||
@Override | ||
public native int save(long configHandle, StringBuffer response ); | ||
public native int save(long configHandle, StringBuffer response); | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
/** {@inheritDoc} */ | ||
@Override | ||
public native int close(long configHandle); | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
/** {@inheritDoc} */ | ||
@Override | ||
public native int listDataSources(long configHandle, StringBuffer response); | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
/** {@inheritDoc} */ | ||
@Override | ||
public native int addDataSource(long configHandle, | ||
String inputJson, | ||
StringBuffer response); | ||
public native int addDataSource(long configHandle, String inputJson, StringBuffer response); | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
/** {@inheritDoc} */ | ||
@Override | ||
public native int deleteDataSource(long configHandle, String inputJson); | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
/** {@inheritDoc} */ | ||
public native String getLastException(); | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
/** {@inheritDoc} */ | ||
public native int getLastExceptionCode(); | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
/** {@inheritDoc} */ | ||
public native void clearLastException(); | ||
} | ||
|
114 changes: 44 additions & 70 deletions
114
src/main/java/com/senzing/g2/engine/G2ConfigMgrJNI.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,88 +1,62 @@ | ||
/********************************************************************************** | ||
© Copyright Senzing, Inc. 2021 | ||
The source code for this program is not published or otherwise divested | ||
of its trade secrets, irrespective of what has been deposited with the U.S. | ||
Copyright Office. | ||
**********************************************************************************/ | ||
* © Copyright Senzing, Inc. 2021 | ||
* The source code for this program is not published or otherwise divested | ||
* of its trade secrets, irrespective of what has been deposited with the U.S. | ||
* Copyright Office. | ||
**********************************************************************************/ | ||
|
||
package com.senzing.g2.engine; | ||
|
||
/** | ||
* Implements the {@link NativeConfig} interface to call the native implementations | ||
* of the functions. | ||
* Implements the {@link NativeConfig} interface to call the native implementations of the | ||
* functions. | ||
*/ | ||
public class G2ConfigMgrJNI implements NativeConfigMgr { | ||
static { | ||
System.loadLibrary("G2"); | ||
} | ||
static { | ||
System.loadLibrary("G2"); | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
@Override | ||
public native int init(String moduleName, | ||
String iniParams, | ||
boolean verboseLogging); | ||
/** {@inheritDoc} */ | ||
@Override | ||
public native int init(String moduleName, String iniParams, boolean verboseLogging); | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
@Override | ||
public native int destroy(); | ||
/** {@inheritDoc} */ | ||
@Override | ||
public native int destroy(); | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
@Override | ||
public native int addConfig(String configStr, | ||
String configComments, | ||
Result<Long> configID); | ||
/** {@inheritDoc} */ | ||
@Override | ||
public native int addConfig(String configStr, String configComments, Result<Long> configID); | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
@Override | ||
public native int getConfig(long configID, StringBuffer response); | ||
/** {@inheritDoc} */ | ||
@Override | ||
public native int getConfig(long configID, StringBuffer response); | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
@Override | ||
public native int getConfigList(StringBuffer response); | ||
/** {@inheritDoc} */ | ||
@Override | ||
public native int getConfigList(StringBuffer response); | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
@Override | ||
public native int setDefaultConfigID(long configID); | ||
/** {@inheritDoc} */ | ||
@Override | ||
public native int setDefaultConfigID(long configID); | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
@Override | ||
public native int getDefaultConfigID(Result<Long> configID); | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
@Override | ||
public native int replaceDefaultConfigID(long oldConfigID, long newConfigID); | ||
/** {@inheritDoc} */ | ||
@Override | ||
public native int getDefaultConfigID(Result<Long> configID); | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
@Override | ||
public native String getLastException(); | ||
/** {@inheritDoc} */ | ||
@Override | ||
public native int replaceDefaultConfigID(long oldConfigID, long newConfigID); | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
@Override | ||
public native int getLastExceptionCode(); | ||
/** {@inheritDoc} */ | ||
@Override | ||
public native String getLastException(); | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
@Override | ||
public native void clearLastException(); | ||
/** {@inheritDoc} */ | ||
@Override | ||
public native int getLastExceptionCode(); | ||
|
||
/** {@inheritDoc} */ | ||
@Override | ||
public native void clearLastException(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,90 +1,60 @@ | ||
/********************************************************************************** | ||
© Copyright Senzing, Inc. 2021-2023 | ||
The source code for this program is not published or otherwise divested | ||
of its trade secrets, irrespective of what has been deposited with the U.S. | ||
Copyright Office. | ||
**********************************************************************************/ | ||
* © Copyright Senzing, Inc. 2021-2023 | ||
* The source code for this program is not published or otherwise divested | ||
* of its trade secrets, irrespective of what has been deposited with the U.S. | ||
* Copyright Office. | ||
**********************************************************************************/ | ||
|
||
package com.senzing.g2.engine; | ||
|
||
/** | ||
* Implements the {@link NativeDiagnostic} to call the native implementations of | ||
* each function. | ||
*/ | ||
/** Implements the {@link NativeDiagnostic} to call the native implementations of each function. */ | ||
public class G2DiagnosticJNI implements NativeDiagnostic { | ||
static { | ||
System.loadLibrary("G2"); | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
/** {@inheritDoc} */ | ||
@Override | ||
public native int init(String moduleName, | ||
String iniParams, | ||
boolean verboseLogging); | ||
public native int init(String moduleName, String iniParams, boolean verboseLogging); | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
/** {@inheritDoc} */ | ||
@Override | ||
public native int initWithConfigID(String moduleName, | ||
String iniParams, | ||
long initConfigID, | ||
boolean verboseLogging); | ||
public native int initWithConfigID( | ||
String moduleName, String iniParams, long initConfigID, boolean verboseLogging); | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
/** {@inheritDoc} */ | ||
@Override | ||
public native int reinit(long initConfigID); | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
/** {@inheritDoc} */ | ||
@Override | ||
public native int destroy(); | ||
|
||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
/** {@inheritDoc} */ | ||
@Override | ||
public native int purgeRepository(); | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
/** {@inheritDoc} */ | ||
@Override | ||
public native int getDatastoreInfo(StringBuffer response); | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
/** {@inheritDoc} */ | ||
@Override | ||
public native int checkDatastorePerformance(int secondsToRun, StringBuffer response); | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
/** {@inheritDoc} */ | ||
@Override | ||
public native int getFeature(long libFeatID, StringBuffer response); | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
/** {@inheritDoc} */ | ||
@Override | ||
public native String getLastException(); | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
/** {@inheritDoc} */ | ||
@Override | ||
public native int getLastExceptionCode(); | ||
|
||
/** | ||
* {@inheritDoc} | ||
*/ | ||
/** {@inheritDoc} */ | ||
@Override | ||
public native void clearLastException(); | ||
} |
Oops, something went wrong.