Skip to content

Updated the code snippets for Beta 4 method names #53

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion csharp/runner/SnippetRunner/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ SortedDictionary<string, SortedDictionary<string, string>> snippetsMap
string source = properties[sourceKey];
source = source.Trim();
Console.WriteLine("Adding data source: " + source);
config.AddDataSource(source);
config.RegisterDataSource(source);
}
string snippetConfig = config.Export();

Expand Down
11 changes: 6 additions & 5 deletions csharp/snippets/configuration/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# Deleting Data
The configuration snippets outline how to modify the Senzing configuration, register the modified configuration with a configuration ID and update the default configuration ID for the repository.

The configuration snippets outline how to modify the Senzing configuration, register the modified configuration with a configuration ID and update the default configuration ID for the repository.

You may either `setDefaultConfigId()` or `replaceDefaultConfigId()`. Initially, the the default config ID must be set since there is no existing config ID to replace. However, when updating you may use `replaceDefaultConfigId()` to guard against race conditions of multiple threads or processes updating at the same time.

## Snippets
* **AddDataSources.java**
* Gets the current default config, creates a modified config with additional data sources, registers that modified config and then replaces the default config ID.
* **InitDefaultConfig.java**
* Initializes the repository with a default config ID using the template configuration provided by Senzing.

* **RegisterDataSources.java**
* Gets the current default config, creates a modified config with additional data sources, registers that modified config and then replaces the default config ID.
* **InitDefaultConfig.java**
* Initializes the repository with a default config ID using the template configuration provided by Senzing.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
// loop through the array and add each data source
foreach (string dataSource in dataSources)
{
config.AddDataSource(dataSource);
config.RegisterDataSource(dataSource);
}

// prepare an in-memory config to be modified and get the handle
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
{
SzDiagnostic diagnostic = env.GetDiagnostic();

string result = diagnostic.CheckDatastorePerformance(SecondsToRun);
string result = diagnostic.CheckRepositoryPerformance(SecondsToRun);

Console.WriteLine(result);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
{
SzDiagnostic diagnostic = env.GetDiagnostic();

string result = diagnostic.GetDatastoreInfo();
string result = diagnostic.GetRepositoryInfo();

Console.WriteLine(result);

Expand Down
4 changes: 2 additions & 2 deletions csharp/snippets/information/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ The information snippets outline the retrieval of different informational aspect

## Snippets

- **CheckDatastorePerformance**
- **CheckRepositoryPerformance**
- Run an insert test against the Senzing repository to gauge performance
- **GetDatastoreInfo**
- **GetRepositoryInfo**
- Return basic information about the Senzing repository(s)
- **GetLicense**
- Return the currently in use license details
Expand Down
2 changes: 1 addition & 1 deletion java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<dependency>
<groupId>com.senzing</groupId>
<artifactId>sz-sdk</artifactId>
<version>4.0.0-beta.3.0</version>
<version>4.0.0-beta.4.0</version>
<scope>system</scope>
<systemPath>${SENZING_PATH}/er/sdk/java/sz-sdk.jar</systemPath>
</dependency>
Expand Down
2 changes: 1 addition & 1 deletion java/runner/java/com/senzing/runner/SnippetRunner.java
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ public static void main(String[] args) {
String source = properties.getProperty(sourceKey);
source = source.trim();
System.out.println("Adding data source: " + source);
config.addDataSource(source);
config.registerDataSource(source);
}
String snippetConfig = config.export();

Expand Down
2 changes: 1 addition & 1 deletion java/snippets/configuration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ You may either `setDefaultConfigId()` or `replaceDefaultConfigId()`. Initially,

## Snippets

* **AddDataSources.java**
* **RegisterDataSources.java**
* Gets the current default config, creates a modified config with additional data sources, registers that modified config and then replaces the default config ID.
* **InitDefaultConfig.java**
* Initializes the repository with a default config ID using the template configuration provided by Senzing.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/**
* Provides a simple example of adding records to the Senzing repository.
*/
public class AddDataSources {
public class RegisterDataSources {
public static void main(String[] args) {
// get the senzing repository settings
String settings = System.getenv("SENZING_ENGINE_CONFIGURATION_JSON");
Expand All @@ -16,7 +16,7 @@ public static void main(String[] args) {
}

// create a descriptive instance name (can be anything)
String instanceName = AddDataSources.class.getSimpleName();
String instanceName = RegisterDataSources.class.getSimpleName();

// initialize the Senzing environment
SzEnvironment env = SzCoreEnvironment.newBuilder()
Expand Down Expand Up @@ -44,7 +44,7 @@ public static void main(String[] args) {

// loop through the array and add each data source
for (String dataSource : dataSources) {
config.addDataSource(dataSource);
config.registerDataSource(dataSource);
}

// export the modified config to JSON text
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* Provides an example of checking database performance via the
* diagnostic hub.
*/
public class CheckDatastorePerformance {
public class CheckRepositoryPerformance {
public static void main(String[] args) {
// get the senzing repository settings
String settings = System.getenv("SENZING_ENGINE_CONFIGURATION_JSON");
Expand All @@ -17,7 +17,7 @@ public static void main(String[] args) {
}

// create a descriptive instance name (can be anything)
String instanceName = CheckDatastorePerformance.class.getSimpleName();
String instanceName = CheckRepositoryPerformance.class.getSimpleName();

// initialize the Senzing environment
SzEnvironment env = SzCoreEnvironment.newBuilder()
Expand All @@ -29,7 +29,7 @@ public static void main(String[] args) {
try {
SzDiagnostic diagnostic = env.getDiagnostic();

String result = diagnostic.checkDatastorePerformance(SECONDS_TO_RUN);
String result = diagnostic.checkRepositoryPerformance(SECONDS_TO_RUN);

System.out.println(result);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* Provides an example of obtaining the datastore information
* from the diagnostic hub.
*/
public class GetDatastoreInfo {
public class GetRepositoryInfo {
public static void main(String[] args) {
// get the senzing repository settings
String settings = System.getenv("SENZING_ENGINE_CONFIGURATION_JSON");
Expand All @@ -17,7 +17,7 @@ public static void main(String[] args) {
}

// create a descriptive instance name (can be anything)
String instanceName = GetDatastoreInfo.class.getSimpleName();
String instanceName = GetRepositoryInfo.class.getSimpleName();

// initialize the Senzing environment
SzEnvironment env = SzCoreEnvironment.newBuilder()
Expand All @@ -29,7 +29,7 @@ public static void main(String[] args) {
try {
SzDiagnostic diagnostic = env.getDiagnostic();

String result = diagnostic.getDatastoreInfo();
String result = diagnostic.getRepositoryInfo();

System.out.println(result);

Expand Down
4 changes: 2 additions & 2 deletions java/snippets/information/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ The information snippets outline the retrieval of different informational aspect

## Snippets

- **CheckDatastorePerformance.java**
- **CheckRepositoryPerformance.java**
- Run an insert test against the Senzing repository to gauge performance
- **GetDatastoreInfo.java**
- **GetRepositoryInfo.java**
- Return basic information about the Senzing repository(s)
- **GetLicense.java**
- Return the currently in use license details
Expand Down
Loading