Skip to content

Commit

Permalink
formatter test
Browse files Browse the repository at this point in the history
  • Loading branch information
kernelsam committed May 13, 2024
1 parent 76f8adc commit 9e9b075
Show file tree
Hide file tree
Showing 86 changed files with 15,408 additions and 18,428 deletions.
13 changes: 10 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -328,9 +328,16 @@
<build>
<plugins>
<plugin>
<groupId>com.google.googlejavaformat</groupId>
<artifactId>google-java-format</artifactId>
<version>1.22.0</version>
<groupId>com.spotify.fmt</groupId>
<artifactId>fmt-maven-plugin</artifactId>
<version>2.23</version>
<executions>
<execution>
<goals>
<goal>format</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
Expand Down
73 changes: 22 additions & 51 deletions src/main/java/com/senzing/g2/engine/G2ConfigJNI.java
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 src/main/java/com/senzing/g2/engine/G2ConfigMgrJNI.java
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();
}
70 changes: 20 additions & 50 deletions src/main/java/com/senzing/g2/engine/G2DiagnosticJNI.java
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();
}
Loading

0 comments on commit 9e9b075

Please sign in to comment.