Class SzCoreDiagnostic

java.lang.Object
com.senzing.sdk.core.SzCoreDiagnostic
All Implemented Interfaces:
SzDiagnostic

public class SzCoreDiagnostic extends Object implements SzDiagnostic
The package-protected implementation of SzDiagnostic that works with the SzCoreEnvironment class.
  • Method Details

    • isDestroyed

      protected boolean isDestroyed()
      Checks if this instance has been destroyed by the associated SzCoreEnvironment.
      Returns:
      true if this instance has been destroyed, otherwise false.
    • getDatastoreInfo

      public String getDatastoreInfo() throws SzException
      Gathers detailed information on the data store and returns it as a JSON String.

      Implemented to call the underlying native API.

      Specified by:
      getDatastoreInfo in interface SzDiagnostic
      Returns:
      A JSON String describing the datastore.
      Throws:
      SzException - If a failure occurs.
    • checkDatastorePerformance

      public String checkDatastorePerformance(int secondsToRun) throws SzException
      Runs non-destruction DB performance tests and returns detail of the result as a JSON String.

      Implemented to call the underlying native API.

      Specified by:
      checkDatastorePerformance in interface SzDiagnostic
      Parameters:
      secondsToRun - How long to run the database performance test.
      Returns:
      The JSON String describing the results of the performance test.
      Throws:
      SzException - If a failure occurs.
    • getFeature

      public String getFeature(long featureId) throws SzException
      Experimental/internal method for obtaining diagnostic feature definition for the specified feature identifier.

      Implemented to call the underlying native API.

      Specified by:
      getFeature in interface SzDiagnostic
      Parameters:
      featureId - The identifier for the feature.
      Returns:
      The feature definition describing the feature for the specified feature ID.
      Throws:
      SzException - If a failure occurs.
    • purgeRepository

      public void purgeRepository() throws SzException
      Purges all data in the configured repository.

      WARNING: There is no undoing from this. Make sure your repository is regularly backed up.

      Implemented to call the underlying native API.

      Specified by:
      purgeRepository in interface SzDiagnostic
      Throws:
      SzException - If a failure occurs.