Class G2JNI
- java.lang.Object
-
- com.senzing.g2.engine.G2JNI
-
- All Implemented Interfaces:
G2Engine,G2Fallible
public class G2JNI extends Object implements G2Engine
Implements theG2Engineinterface to call the native implementations of each function.
-
-
Field Summary
-
Fields inherited from interface com.senzing.g2.engine.G2Engine
G2_ENTITY_BRIEF_DEFAULT_FLAGS, G2_ENTITY_DEFAULT_FLAGS, G2_ENTITY_INCLUDE_ALL_FEATURES, G2_ENTITY_INCLUDE_ALL_RELATIONS, G2_ENTITY_INCLUDE_DISCLOSED_RELATIONS, G2_ENTITY_INCLUDE_ENTITY_NAME, G2_ENTITY_INCLUDE_NAME_ONLY_RELATIONS, G2_ENTITY_INCLUDE_POSSIBLY_RELATED_RELATIONS, G2_ENTITY_INCLUDE_POSSIBLY_SAME_RELATIONS, G2_ENTITY_INCLUDE_RECORD_DATA, G2_ENTITY_INCLUDE_RECORD_FEATURE_IDS, G2_ENTITY_INCLUDE_RECORD_FORMATTED_DATA, G2_ENTITY_INCLUDE_RECORD_JSON_DATA, G2_ENTITY_INCLUDE_RECORD_MATCHING_INFO, G2_ENTITY_INCLUDE_RECORD_SUMMARY, G2_ENTITY_INCLUDE_RELATED_ENTITY_NAME, G2_ENTITY_INCLUDE_RELATED_MATCHING_INFO, G2_ENTITY_INCLUDE_RELATED_RECORD_DATA, G2_ENTITY_INCLUDE_RELATED_RECORD_SUMMARY, G2_ENTITY_INCLUDE_REPRESENTATIVE_FEATURES, G2_ENTITY_OPTION_INCLUDE_FEATURE_STATS, G2_ENTITY_OPTION_INCLUDE_INTERNAL_FEATURES, G2_EXPORT_DEFAULT_FLAGS, G2_EXPORT_INCLUDE_ALL_ENTITIES, G2_EXPORT_INCLUDE_ALL_RELATIONSHIPS, G2_EXPORT_INCLUDE_DISCLOSED, G2_EXPORT_INCLUDE_NAME_ONLY, G2_EXPORT_INCLUDE_POSSIBLY_RELATED, G2_EXPORT_INCLUDE_POSSIBLY_SAME, G2_EXPORT_INCLUDE_RESOLVED, G2_EXPORT_INCLUDE_SINGLETONS, G2_FIND_PATH_DEFAULT_FLAGS, G2_FIND_PATH_PREFER_EXCLUDE, G2_RECORD_DEFAULT_FLAGS, G2_SEARCH_BY_ATTRIBUTES_ALL, G2_SEARCH_BY_ATTRIBUTES_DEFAULT_FLAGS, G2_SEARCH_BY_ATTRIBUTES_MINIMAL_ALL, G2_SEARCH_BY_ATTRIBUTES_MINIMAL_STRONG, G2_SEARCH_BY_ATTRIBUTES_STRONG, G2_SEARCH_INCLUDE_ALL_ENTITIES, G2_SEARCH_INCLUDE_FEATURE_SCORES, G2_SEARCH_INCLUDE_NAME_ONLY, G2_SEARCH_INCLUDE_POSSIBLY_RELATED, G2_SEARCH_INCLUDE_POSSIBLY_SAME, G2_SEARCH_INCLUDE_RESOLVED, G2_SEARCH_INCLUDE_STATS, G2_WHY_ENTITY_DEFAULT_FLAGS
-
-
Constructor Summary
Constructors Constructor Description G2JNI()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intaddRecord(String dataSourceCode, String recordID, String jsonData, String loadID)Loads the JSON record with the specified data source code and record ID.intaddRecordWithInfo(String dataSourceCode, String recordID, String jsonData, String loadID, int flags, StringBuffer response)This method is used to add entity data into the system.intaddRecordWithInfoWithReturnedRecordID(String dataSourceCode, String jsonData, String loadID, int flags, StringBuffer recordID, StringBuffer response)intaddRecordWithReturnedRecordID(String dataSourceCode, StringBuffer recordID, String jsonData, String loadID)Loads the JSON record.voidclearLastException()Clears the information about the last error the system received.voidcloseExport(long exportHandle)This function closes an export handle, to clean up system resources.intcloseExportV3(long exportHandle)This function closes an export handle, to clean up system resources.longcountRedoRecords()Gets the number of redo records waiting to be processed.intdeleteRecord(String dataSourceCode, String recordID, String loadID)Delete the record that has already been loadedintdeleteRecordWithInfo(String dataSourceCode, String recordID, String loadID, int flags, StringBuffer response)Delete the record that has already been loaded.intdestroy()Uninitializes the G2 engine.intexportConfig(StringBuffer response)Exports the JSON configuration that is currently loaded into the engine.intexportConfig(StringBuffer response, Result<Long> configID)Exports the JSON configuration that is currently loaded into the engine.longexportCSVEntityReportV2(String csvColumnList, int flags)This is used to export entity data from known entities.intexportCSVEntityReportV3(String csvColumnList, int flags, Result<Long> exportHandle)This is used to export entity data from known entities.longexportJSONEntityReport(int flags)This is used to export entity data from known entities.intexportJSONEntityReportV3(int flags, Result<Long> exportHandle)This is used to export entity data from known entities.StringfetchNext(long exportHandle)This function is used to read entity data from an export handle, one data row at a time.intfetchNextV3(long exportHandle, StringBuffer response)This function is used to read entity data from an export handle, one data row at a time.intfindNetworkByEntityID(String entityList, int maxDegree, int buildOutDegree, int maxEntities, StringBuffer response)This method is used to find a network of entity relationships, surrounding the paths between a set of entities.intfindNetworkByEntityIDV2(String entityList, int maxDegree, int buildOutDegree, int maxEntities, int flags, StringBuffer response)This method is used to find a network of entity relationships, surrounding the paths between a set of entities.intfindNetworkByRecordID(String recordList, int maxDegree, int buildOutDegree, int maxEntities, StringBuffer response)This method is used to find a network of entity relationships, surrounding the paths between a set of entities.intfindNetworkByRecordIDV2(String recordList, int maxDegree, int buildOutDegree, int maxEntities, int flags, StringBuffer response)This method is used to find a network of entity relationships, surrounding the paths between a set of entities.intfindPathByEntityID(long entityID1, long entityID2, int maxDegree, StringBuffer response)This method is used to find a relationship path between entities that are identified by entity ID.intfindPathByEntityIDV2(long entityID1, long entityID2, int maxDegree, int flags, StringBuffer response)This method is used to find a relationship path between entities that are identified by entity ID.intfindPathByRecordID(String dataSourceCode1, String recordID1, String dataSourceCode2, String recordID2, int maxDegree, StringBuffer response)This method is used to find a relationship path between entities that are identified by the data source code and record ID of records in each of the entities.intfindPathByRecordIDV2(String dataSourceCode1, String recordID1, String dataSourceCode2, String recordID2, int maxDegree, int flags, StringBuffer response)This method is used to find a relationship path between entities that are identified by the data source code and record ID of records in each of the entities.intfindPathExcludingByEntityID(long entityID1, long entityID2, int maxDegree, String excludedEntities, int flags, StringBuffer response)This method is used to find a relationship path between two entities identified by their entity ID's that excludes one or more entities, also identified by their entity ID's.intfindPathExcludingByRecordID(String dataSourceCode1, String recordID1, String dataSourceCode2, String recordID2, int maxDegree, String excludedEntities, int flags, StringBuffer response)This method is used to find a relationship path between two entities identified by the data source codes and record IDs of their composite records where that path excludes one or more entities, also identified by the data source codes and record IDs of their composite records.intfindPathIncludingSourceByEntityID(long entityID1, long entityID2, int maxDegree, String excludedEntities, String requiredDsrcs, int flags, StringBuffer response)This method is used to find a relationship path between two entities identified by their entity ID's.intfindPathIncludingSourceByRecordID(String dataSourceCode1, String recordID1, String dataSourceCode2, String recordID2, int maxDegree, String excludedEntities, String requiredDsrcs, int flags, StringBuffer response)This method is used to find a relationship path between two entities identified by the data source codes and record IDs of their composite records.intgetActiveConfigID(Result<Long> configID)Returns an identifier for the loaded G2 engine configurationintgetEntityByEntityID(long entityID, StringBuffer response)This method is used to retrieve information about a specific resolved entity.intgetEntityByEntityIDV2(long entityID, int flags, StringBuffer response)This method is used to retrieve information about a specific resolved entity.intgetEntityByRecordID(String dataSourceCode, String recordID, StringBuffer response)This method is used to retrieve information about the resolved entity containing a particular observation record.intgetEntityByRecordIDV2(String dataSourceCode, String recordID, int flags, StringBuffer response)This method is used to retrieve information about the resolved entity containing a particular observation record.StringgetLastException()Returns a string about the last error the system received.intgetLastExceptionCode()Returns the exception code of the last error the system received.intgetRecord(String dataSourceCode, String recordID, StringBuffer response)This method is used to retrieve the stored record.intgetRecordV2(String dataSourceCode, String recordID, int flags, StringBuffer response)This method is used to retrieve the stored record.intgetRedoRecord(StringBuffer record)Retrieves a pending redo record from the reevaluation queue.intgetRepositoryLastModifiedTime(Result<Long> lastModifiedTime)Returns a long integer representing number of seconds since January 1, 1970 12:00am GMT (epoch time).intinitV2(String moduleName, String iniParams, boolean verboseLogging)Initializes the G2 Engine API with the specified module name, init parameters and flag indicating verbose logging.intinitWithConfigIDV2(String moduleName, String iniParams, long initConfigID, boolean verboseLogging)Initializes the G2 Engine object with the module name, initialization parameters, verbose logging flag and a specific configuration ID identifying the configuration to use.intprimeEngine()May optionally be called to pre-initialize some of the heavier weight internal resources of the G2 engine.intprocess(String record)This method will send a record for processing in g2.intprocess(String record, StringBuffer response)This method will send a record for processing in g2.intprocessRedoRecord(StringBuffer record)Processes a redo record.intprocessRedoRecordWithInfo(int flags, StringBuffer record, StringBuffer response)Processes a redo record.intprocessWithInfo(String record, int flags, StringBuffer response)This method will send a record for processing in g2.intpurgeRepository()Purges all data in the configured repository WARNING: There is no undoing from this.intreevaluateEntity(long entityID, int flags)Reevaluate a resolved entity identified by the specified entity ID.intreevaluateEntityWithInfo(long entityID, int flags, StringBuffer response)Reevaluate a resolved entity and return a list of resolved entitiesintreevaluateRecord(String dataSourceCode, String recordID, int flags)Reevaluate a record that has already been loadedintreevaluateRecordWithInfo(String dataSourceCode, String recordID, int flags, StringBuffer response)Reevaluate a record that has already been loaded.intreinitV2(long initConfigID)Reinitializes with the specified configuration ID.intreplaceRecord(String dataSourceCode, String recordID, String jsonData, String loadID)Replace the JSON record that has already been loadedintreplaceRecordWithInfo(String dataSourceCode, String recordID, String jsonData, String loadID, int flags, StringBuffer response)Replace the JSON record that has already been loaded and returns a list of modified resolved entitiesintsearchByAttributes(String jsonData, StringBuffer response)This method searches for entities that contain attribute information that are relevant to a set of input search attributes.intsearchByAttributesV2(String jsonData, int flags, StringBuffer response)This method searches for entities that contain attribute information that are relevant to a set of input search attributes.Stringstats()Returns the current internal engine workload statistics for the process.intwhyEntities(long entityID1, long entityID2, StringBuffer response)This method determines how two entities are related to each other.intwhyEntitiesV2(long entityID1, long entityID2, int flags, StringBuffer response)This method determines how two entities are related to each other.intwhyEntityByEntityID(long entityID, StringBuffer response)This method determines why records are included in the resolved entity they belong to.intwhyEntityByEntityIDV2(long entityID, int flags, StringBuffer response)This method determines why records are included in the resolved entity they belong to.intwhyEntityByRecordID(String dataSourceCode, String recordID, StringBuffer response)This method determines why records are included in the resolved entity they belong to.intwhyEntityByRecordIDV2(String dataSourceCode, String recordID, int flags, StringBuffer response)This method determines why records are included in the resolved entity they belong to.intwhyRecords(String dataSourceCode1, String recordID1, String dataSourceCode2, String recordID2, StringBuffer response)This method determines how two records are related to each other.intwhyRecordsV2(String dataSourceCode1, String recordID1, String dataSourceCode2, String recordID2, int flags, StringBuffer response)This method determines how two records are related to each other.
-
-
-
Method Detail
-
initV2
public int initV2(String moduleName, String iniParams, boolean verboseLogging)
Initializes the G2 Engine API with the specified module name, init parameters and flag indicating verbose logging. If theG2CONFIGFILEinit parameter is absent then the default configuration from the repository is used.- Specified by:
initV2in interfaceG2Engine- Parameters:
moduleName- A short name given to this instance of the engine objectiniParams- A JSON string containing configuration parametersverboseLogging- Enable diagnostic logging which will print a massive amount of information to stdout- Returns:
- Zero (0) on success, non-zero on failure.
-
initWithConfigIDV2
public int initWithConfigIDV2(String moduleName, String iniParams, long initConfigID, boolean verboseLogging)
Initializes the G2 Engine object with the module name, initialization parameters, verbose logging flag and a specific configuration ID identifying the configuration to use.- Specified by:
initWithConfigIDV2in interfaceG2Engine- Parameters:
moduleName- The module name with which to initialize.iniParams- The JSON initialization parameters.initConfigID- The specific configuration ID to initialize with.verboseLogging- Whether or not to initialize with verbose logging.- Returns:
- Zero (0) on success, non-zero on failure.
-
reinitV2
public int reinitV2(long initConfigID)
Reinitializes with the specified configuration ID.
-
destroy
public int destroy()
Uninitializes the G2 engine.
-
primeEngine
public int primeEngine()
May optionally be called to pre-initialize some of the heavier weight internal resources of the G2 engine.- Specified by:
primeEnginein interfaceG2Engine- Returns:
- Zero (0) on success and non-zero on failure.
-
purgeRepository
public int purgeRepository()
Purges all data in the configured repository WARNING: There is no undoing from this. Make sure your repository is regularly backed up.- Specified by:
purgeRepositoryin interfaceG2Engine- Returns:
- Zero (0) on success and non-zero on failure.
-
stats
public String stats()
Returns the current internal engine workload statistics for the process. The counters are reset after each call.
-
getLastException
public String getLastException()
Returns a string about the last error the system received. This is most commonly called after an API function returns an error code (non-zero or NULL)- Specified by:
getLastExceptionin interfaceG2Fallible- Returns:
- An error message
-
getLastExceptionCode
public int getLastExceptionCode()
Returns the exception code of the last error the system received. This is most commonly called after an API function returns an error code (non-zero or NULL)- Specified by:
getLastExceptionCodein interfaceG2Fallible- Returns:
- An error code
-
clearLastException
public void clearLastException()
Clears the information about the last error the system received.- Specified by:
clearLastExceptionin interfaceG2Fallible
-
exportConfig
public int exportConfig(StringBuffer response)
Exports the JSON configuration that is currently loaded into the engine.- Specified by:
exportConfigin interfaceG2Engine- Parameters:
response- TheStringBufferto retrieve the JSON configuration document.- Returns:
- Zero (0) on success and non-zero on failure.
-
exportConfig
public int exportConfig(StringBuffer response, Result<Long> configID)
Exports the JSON configuration that is currently loaded into the engine.- Specified by:
exportConfigin interfaceG2Engine- Parameters:
response- TheStringBufferto retrieve the JSON configuration document.configID- TheResultobject to store the configuration ID.- Returns:
- Zero (0) on success and non-zero on failure.
-
getActiveConfigID
public int getActiveConfigID(Result<Long> configID)
Returns an identifier for the loaded G2 engine configuration- Specified by:
getActiveConfigIDin interfaceG2Engine- Parameters:
configID- The identifier value for the config- Returns:
- Zero (0) on success and non-zero on failure.
-
getRepositoryLastModifiedTime
public int getRepositoryLastModifiedTime(Result<Long> lastModifiedTime)
Returns a long integer representing number of seconds since January 1, 1970 12:00am GMT (epoch time). This indicates the last time the data repository was modified.- Specified by:
getRepositoryLastModifiedTimein interfaceG2Engine- Parameters:
lastModifiedTime- The last modified time of the data repository- Returns:
- Zero (0) on success and non-zero on failure.
-
addRecord
public int addRecord(String dataSourceCode, String recordID, String jsonData, String loadID)
Loads the JSON record with the specified data source code and record ID. The specified JSON data may contain theDATA_SOURCEandRECORD_IDelements, but, if so, they must match the specified parameters.- Specified by:
addRecordin interfaceG2Engine- Parameters:
dataSourceCode- The data source for the observation.recordID- The ID for the recordjsonData- A JSON document containing the attribute information for the observation.loadID- The observation load ID for the record, can be null and will default to dataSourceCode- Returns:
- Zero (0) on success and non-zero on failure.
-
replaceRecord
public int replaceRecord(String dataSourceCode, String recordID, String jsonData, String loadID)
Replace the JSON record that has already been loaded- Specified by:
replaceRecordin interfaceG2Engine- Parameters:
dataSourceCode- The data source for the observation.recordID- The ID for the recordjsonData- A JSON document containing the attribute information for the observation.loadID- The observation load ID for the record, can be null and will default to dataSourceCode.- Returns:
- Zero (0) on success and non-zero on failure.
-
replaceRecordWithInfo
public int replaceRecordWithInfo(String dataSourceCode, String recordID, String jsonData, String loadID, int flags, StringBuffer response)
Replace the JSON record that has already been loaded and returns a list of modified resolved entities- Specified by:
replaceRecordWithInfoin interfaceG2Engine- Parameters:
dataSourceCode- The data source for the observation.recordID- The ID for the recordjsonData- A JSON document containing the attribute information for the observation.loadID- The observation load ID for the record, can be null and will default to dataSourceCodeflags- The flags to control how the operation is performed and specifically the content of the response JSON document.response- AStringBufferfor returning the response document. If an error occurred, an error response is stored here.- Returns:
- Zero (0) on success and non-zero on failure.
-
addRecordWithReturnedRecordID
public int addRecordWithReturnedRecordID(String dataSourceCode, StringBuffer recordID, String jsonData, String loadID)
Loads the JSON record. This works similarly to the G2_addRecord function, except that instead or requiring the recordID as an input parameter, the recordID is generated internally and returned through the parameter list.- Specified by:
addRecordWithReturnedRecordIDin interfaceG2Engine- Parameters:
dataSourceCode- The data source for the observation.recordID- A buffer that returns the ID for the recordjsonData- A JSON document containing the attribute information for the observation.loadID- The observation load ID for the record, can be null and will default to dataSourceCode- Returns:
- Zero (0) on success and non-zero on failure.
-
addRecordWithInfo
public int addRecordWithInfo(String dataSourceCode, String recordID, String jsonData, String loadID, int flags, StringBuffer response)
This method is used to add entity data into the system. This works similarly to the G2_addRecord function, except that instead or requiring the recordID as an input parameter, the recordID is generated internally and returned through the parameter list. A list of modified resolved entities is also returned- Specified by:
addRecordWithInfoin interfaceG2Engine- Parameters:
dataSourceCode- The data source for the observation.recordID- The ID for the record. If specified, then it will be used, if empty string, then G2 will generate an IDjsonData- A JSON document containing the attribute information for the observation.loadID- The observation load ID for the record, can be NULL and will default to dataSourceCode.flags- The flags to control how the operation is performed and specifically the content of the response JSON document.response- AStringBufferfor returning the response document. If an error occurred, an error response is stored here.- Returns:
- Zero (0) on success and non-zero on failure.
-
addRecordWithInfoWithReturnedRecordID
public int addRecordWithInfoWithReturnedRecordID(String dataSourceCode, String jsonData, String loadID, int flags, StringBuffer recordID, StringBuffer response)
- Specified by:
addRecordWithInfoWithReturnedRecordIDin interfaceG2Engine- Parameters:
dataSourceCode- The data source for the observation.jsonData- A JSON document containing the attribute information for the observation.loadID- The observation load ID for the record, can be null and will default to dataSourceCode.flags- The flags to control how the operation is performed and specifically the content of the response JSON document.recordID- A buffer that returns the ID for the recordresponse- TheStringBufferto write the response JSON document to.- Returns:
- Zero (0) on success and non-zero on failure.
-
deleteRecord
public int deleteRecord(String dataSourceCode, String recordID, String loadID)
Delete the record that has already been loaded- Specified by:
deleteRecordin interfaceG2Engine- Parameters:
dataSourceCode- The data source for the observation.recordID- The ID for the recordloadID- The observation load ID for the record, can be null and will default todataSourceCode.- Returns:
- Zero (0) on success and non-zero on failure.
-
deleteRecordWithInfo
public int deleteRecordWithInfo(String dataSourceCode, String recordID, String loadID, int flags, StringBuffer response)
Delete the record that has already been loaded. Returns a list of modified resolved entities- Specified by:
deleteRecordWithInfoin interfaceG2Engine- Parameters:
dataSourceCode- The data source for the observation.recordID- The ID for the recordloadID- The observation load ID for the record, can be null and will default todataSourceCode.flags- The flags to control how the operation is performed and specifically the content of the response JSON document.response- AStringBufferfor returning the response document. If an error occurred, an error response is stored here.- Returns:
- Zero (0) on success and non-zero on failure.
-
reevaluateRecord
public int reevaluateRecord(String dataSourceCode, String recordID, int flags)
Reevaluate a record that has already been loaded- Specified by:
reevaluateRecordin interfaceG2Engine- Parameters:
dataSourceCode- The data source for the observation.recordID- The ID for the recordflags- The flags to control how the operation is performed.- Returns:
- Zero (0) on success and non-zero on failure.
-
reevaluateEntity
public int reevaluateEntity(long entityID, int flags)Reevaluate a resolved entity identified by the specified entity ID.- Specified by:
reevaluateEntityin interfaceG2Engine- Parameters:
entityID- The ID of the resolved entity to reevaluateflags- The flags to control how the operation is performed.- Returns:
- Zero (0) on success and non-zero on failure.
-
reevaluateRecordWithInfo
public int reevaluateRecordWithInfo(String dataSourceCode, String recordID, int flags, StringBuffer response)
Reevaluate a record that has already been loaded. Returns a list of resolved entities.- Specified by:
reevaluateRecordWithInfoin interfaceG2Engine- Parameters:
dataSourceCode- The data source for the observation.recordID- The ID for the recordflags- The flags to control how the operation is performed and specifically the content of the response JSON document.response- AStringBufferfor returning the response document. If an error occurred, an error response is stored here.- Returns:
- Zero (0) on success and non-zero on failure.
-
reevaluateEntityWithInfo
public int reevaluateEntityWithInfo(long entityID, int flags, StringBuffer response)Reevaluate a resolved entity and return a list of resolved entities- Specified by:
reevaluateEntityWithInfoin interfaceG2Engine- Parameters:
entityID- The ID of the resolved entity to reevaluateflags- The flags to control how the operation is performed and specifically the content of the response JSON document.response- AStringBufferfor returning the response document. If an error occurred, an error response is stored here.- Returns:
- Zero (0) on success and non-zero on failure.
-
searchByAttributes
public int searchByAttributes(String jsonData, StringBuffer response)
This method searches for entities that contain attribute information that are relevant to a set of input search attributes.- Specified by:
searchByAttributesin interfaceG2Engine- Parameters:
jsonData- A JSON document containing the attribute information to search forresponse- AStringBufferfor returning the response document. If an error occurred, an error response is stored here.- Returns:
- Zero (0) on success and non-zero on failure.
-
searchByAttributesV2
public int searchByAttributesV2(String jsonData, int flags, StringBuffer response)
This method searches for entities that contain attribute information that are relevant to a set of input search attributes.- Specified by:
searchByAttributesV2in interfaceG2Engine- Parameters:
jsonData- A JSON document containing the attribute information to search forflags- The flags to control how the operation is performed and specifically the content of the response JSON document.response- AStringBufferfor returning the response document. If an error occurred, an error response is stored here.- Returns:
- Zero (0) on success and non-zero on failure.
-
getEntityByEntityID
public int getEntityByEntityID(long entityID, StringBuffer response)This method is used to retrieve information about a specific resolved entity. The information is returned as a JSON document. An entityID may be named ENTITY_ID, RESOLVED_ID, or RELATED_ID in the JSON or CSV function output.- Specified by:
getEntityByEntityIDin interfaceG2Engine- Parameters:
entityID- The resolved entity to retrieve information forresponse- AStringBufferfor returning the response document. If an error occurred, an error response is stored here.- Returns:
- Returns zero (0) for success. Returns negative-one (-1) if the response status indicates failure or the G2 module is not initialized. Returns negative-two (-2) if an exception was thrown and caught.
-
getEntityByEntityIDV2
public int getEntityByEntityIDV2(long entityID, int flags, StringBuffer response)This method is used to retrieve information about a specific resolved entity. The information is returned as a JSON document. An entityID may be named ENTITY_ID, RESOLVED_ID, or RELATED_ID in the JSON or CSV function output.- Specified by:
getEntityByEntityIDV2in interfaceG2Engine- Parameters:
entityID- The resolved entity to retrieve information forflags- The flags to control how the operation is performed and specifically the content of the response JSON document.response- AStringBufferfor returning the response document. If an error occurred, an error response is stored here.- Returns:
- Returns zero (0) for success. Returns negative-one (-1) if the response status indicates failure or the G2 module is not initialized. Returns negative-two (-2) if an exception was thrown and caught.
-
getEntityByRecordID
public int getEntityByRecordID(String dataSourceCode, String recordID, StringBuffer response)
This method is used to retrieve information about the resolved entity containing a particular observation record.- Specified by:
getEntityByRecordIDin interfaceG2Engine- Parameters:
dataSourceCode- The data source of the observation to search forrecordID- The record ID of the observation to search forresponse- AStringBufferfor returning the response document. If an error occurred, an error response is stored here.- Returns:
- Zero (0) on success and non-zero on failure.
-
getEntityByRecordIDV2
public int getEntityByRecordIDV2(String dataSourceCode, String recordID, int flags, StringBuffer response)
This method is used to retrieve information about the resolved entity containing a particular observation record.- Specified by:
getEntityByRecordIDV2in interfaceG2Engine- Parameters:
dataSourceCode- The data source of the observation to search forrecordID- The record ID of the observation to search forflags- The flags to control how the operation is performed and specifically the content of the response JSON document.response- AStringBufferfor returning the response document. If an error occurred, an error response is stored here.- Returns:
- Zero (0) on success and non-zero on failure.
-
findPathByEntityID
public int findPathByEntityID(long entityID1, long entityID2, int maxDegree, StringBuffer response)This method is used to find a relationship path between entities that are identified by entity ID.- Specified by:
findPathByEntityIDin interfaceG2Engine- Parameters:
entityID1- The entity ID of the first entity.entityID2- The entity ID of the second entity.maxDegree- The maximum number of degrees for the path search.response- TheStringBufferto write the JSON response document to.- Returns:
- Zero (0) on success and non-zero on failure.
-
findPathByEntityIDV2
public int findPathByEntityIDV2(long entityID1, long entityID2, int maxDegree, int flags, StringBuffer response)This method is used to find a relationship path between entities that are identified by entity ID.- Specified by:
findPathByEntityIDV2in interfaceG2Engine- Parameters:
entityID1- The entity ID of the first entity.entityID2- The entity ID of the second entity.maxDegree- The maximum number of degrees for the path search.flags- The flags to control how the operation is performed and specifically the content of the response JSON document.response- TheStringBufferto write the JSON response document to.- Returns:
- Zero (0) on success and non-zero on failure.
-
findPathByRecordID
public int findPathByRecordID(String dataSourceCode1, String recordID1, String dataSourceCode2, String recordID2, int maxDegree, StringBuffer response)
This method is used to find a relationship path between entities that are identified by the data source code and record ID of records in each of the entities.- Specified by:
findPathByRecordIDin interfaceG2Engine- Parameters:
dataSourceCode1- The data source code of the first record.recordID1- The record ID of the first record.dataSourceCode2- The data source code of the second record.recordID2- The record ID of the second record.maxDegree- The maximum number of degrees for the path search.response- TheStringBufferto write the JSON response document to.- Returns:
- Zero (0) on success and non-zero on failure.
-
findPathByRecordIDV2
public int findPathByRecordIDV2(String dataSourceCode1, String recordID1, String dataSourceCode2, String recordID2, int maxDegree, int flags, StringBuffer response)
This method is used to find a relationship path between entities that are identified by the data source code and record ID of records in each of the entities.- Specified by:
findPathByRecordIDV2in interfaceG2Engine- Parameters:
dataSourceCode1- The data source code of the first record.recordID1- The record ID of the first record.dataSourceCode2- The data source code of the second record.recordID2- The record ID of the second record.maxDegree- The maximum number of degrees for the path search.flags- The flags to control how the operation is performed and specifically the content of the response JSON document.response- TheStringBufferto write the JSON response document to.- Returns:
- Zero (0) on success and non-zero on failure.
-
findPathExcludingByEntityID
public int findPathExcludingByEntityID(long entityID1, long entityID2, int maxDegree, String excludedEntities, int flags, StringBuffer response)This method is used to find a relationship path between two entities identified by their entity ID's that excludes one or more entities, also identified by their entity ID's.
The excluded entities are identified by their entity ID's in a JSON document with the following format:
{ "ENTITIES": [ { "ENTITY_ID": <entity_id1> }, { "ENTITY_ID": <entity_id2> }, . . . { "ENTITY_ID": <entity_idN> } ] }- Specified by:
findPathExcludingByEntityIDin interfaceG2Engine- Parameters:
entityID1- The entity ID of the first entity.entityID2- The entity ID of the second entity.maxDegree- The maximum number of degrees for the path search.excludedEntities- The JSON document identifying the excluded entities via their entity ID's.flags- The flags to control how the operation is performed and specifically the content of the response JSON document.response- TheStringBufferto write the JSON response document to.- Returns:
- Zero (0) on success and non-zero on failure.
-
findPathExcludingByRecordID
public int findPathExcludingByRecordID(String dataSourceCode1, String recordID1, String dataSourceCode2, String recordID2, int maxDegree, String excludedEntities, int flags, StringBuffer response)
This method is used to find a relationship path between two entities identified by the data source codes and record IDs of their composite records where that path excludes one or more entities, also identified by the data source codes and record IDs of their composite records.
The excluded entities are identified by the data source codes and record ID's of their composite records in a JSON document with the following format:
{ "ENTITIES": [ { "DATA_SOURCE": "<data_source1>", "RECORD_ID": "<record_id1>" }, { "DATA_SOURCE": "<data_source2>", "RECORD_ID": "<record_id2>" }, . . . { "DATA_SOURCE": "<data_sourceN>", "RECORD_ID": "<record_idN>" } ] }- Specified by:
findPathExcludingByRecordIDin interfaceG2Engine- Parameters:
dataSourceCode1- The data source code of the first record.recordID1- The record ID of the first record.dataSourceCode2- The data source code of the second record.recordID2- The record ID of the second record.maxDegree- The maximum number of degrees for the path search.excludedEntities- The JSON document identifying the excluded entities via their entity ID's.flags- The flags to control how the operation is performed and specifically the content of the response JSON document.response- TheStringBufferto write the JSON response document to.- Returns:
- Zero (0) on success and non-zero on failure.
-
findPathIncludingSourceByEntityID
public int findPathIncludingSourceByEntityID(long entityID1, long entityID2, int maxDegree, String excludedEntities, String requiredDsrcs, int flags, StringBuffer response)This method is used to find a relationship path between two entities identified by their entity ID's. The path will exclude the one or more entities, also identified by the specified entity ID's and will require that the path contains at least one of the data sources identified by the one or more specified data sources codes.
The excluded entities are identified by their entity ID's in a JSON document with the following format:
{ "ENTITIES": [ { "ENTITY_ID": <entity_id1> }, { "ENTITY_ID": <entity_id2> }, . . . { "ENTITY_ID": <entity_idN> } ] }The required set of data sources are identified by their data source codes in a JSON document with the following format:
{ "DATA_SOURCES": [ "<data_source_code1>", "<data_source_code2>", . . . "<data_source_codeN>" ] }- Specified by:
findPathIncludingSourceByEntityIDin interfaceG2Engine- Parameters:
entityID1- The entity ID of the first entity.entityID2- The entity ID of the second entity.maxDegree- The maximum number of degrees for the path search.excludedEntities- The JSON document identifying the excluded entities via their entity ID's.requiredDsrcs- The JSON document identifying the data sources that must be included on the path.flags- The flags to control how the operation is performed and specifically the content of the response JSON document.response- TheStringBufferto write the JSON response document to.- Returns:
- Zero (0) on success and non-zero on failure.
-
findPathIncludingSourceByRecordID
public int findPathIncludingSourceByRecordID(String dataSourceCode1, String recordID1, String dataSourceCode2, String recordID2, int maxDegree, String excludedEntities, String requiredDsrcs, int flags, StringBuffer response)
This method is used to find a relationship path between two entities identified by the data source codes and record IDs of their composite records. THe path will exclude the one or more entities also identified by the specified data source code and record ID pairs that identify the composite records of the excluded entities and further will require the path contains at least one of the data sources identified by the one or more specified data sources codes.
The excluded entities are identified by the data source codes and record ID's of their composite records in a JSON document with the following format:
{ "ENTITIES": [ { "DATA_SOURCE": "<data_source1>", "RECORD_ID": "<record_id1>" }, { "DATA_SOURCE": "<data_source2>", "RECORD_ID": "<record_id2>" }, . . . { "DATA_SOURCE": "<data_sourceN>", "RECORD_ID": "<record_idN>" } ] }The required set of data sources are identified by their data source codes in a JSON document with the following format:
{ "DATA_SOURCES": [ "<data_source_code1>", "<data_source_code2>", . . . "<data_source_codeN>" ] }- Specified by:
findPathIncludingSourceByRecordIDin interfaceG2Engine- Parameters:
dataSourceCode1- The data source code of the first record.recordID1- The record ID of the first record.dataSourceCode2- The data source code of the second record.recordID2- The record ID of the second record.maxDegree- The maximum number of degrees for the path search.excludedEntities- The JSON document identifying the excluded entities via their entity ID's.requiredDsrcs- The JSON document identifying the data sources that must be included on the path.flags- The flags to control how the operation is performed and specifically the content of the response JSON document.response- TheStringBufferto write the JSON response document to.- Returns:
- Zero (0) on success and non-zero on failure.
-
findNetworkByEntityID
public int findNetworkByEntityID(String entityList, int maxDegree, int buildOutDegree, int maxEntities, StringBuffer response)
This method is used to find a network of entity relationships, surrounding the paths between a set of entities. The entities are identified by their entity IDs.
The desired entities are identified by their entity ID's in a JSON document with the following format:
{ "ENTITIES": [ { "ENTITY_ID": <entity_id1> }, { "ENTITY_ID": <entity_id2> }, . . . { "ENTITY_ID": <entity_idN> } ] }- Specified by:
findNetworkByEntityIDin interfaceG2Engine- Parameters:
entityList- The JSON document specifying the entity ID's of the desired entities.maxDegree- The maximum number of degrees for the path search between the specified entities.buildOutDegree- The number of relationship degrees to build out from each of the found entities.maxEntities- The maximum number of entities to build out to.response- TheStringBufferto write the JSON response document to.- Returns:
- Zero (0) on success and non-zero on failure.
-
findNetworkByEntityIDV2
public int findNetworkByEntityIDV2(String entityList, int maxDegree, int buildOutDegree, int maxEntities, int flags, StringBuffer response)
This method is used to find a network of entity relationships, surrounding the paths between a set of entities. The entities are identified by their entity IDs.
The desired entities are identified by their entity ID's in a JSON document with the following format:
{ "ENTITIES": [ { "ENTITY_ID": <entity_id1> }, { "ENTITY_ID": <entity_id2> }, . . . { "ENTITY_ID": <entity_idN> } ] }- Specified by:
findNetworkByEntityIDV2in interfaceG2Engine- Parameters:
entityList- The JSON document specifying the entity ID's of the desired entities.maxDegree- The maximum number of degrees for the path search between the specified entities.buildOutDegree- The number of relationship degrees to build out from each of the found entities.maxEntities- The maximum number of entities to build out to.flags- The flags to control how the operation is performed and specifically the content of the response JSON document.response- TheStringBufferto write the JSON response document to.- Returns:
- Zero (0) on success and non-zero on failure.
-
findNetworkByRecordID
public int findNetworkByRecordID(String recordList, int maxDegree, int buildOutDegree, int maxEntities, StringBuffer response)
This method is used to find a network of entity relationships, surrounding the paths between a set of entities. The entities are identified by their composite records having the specified data source code and record ID pairs.
The composite records af the desired entities are identified by the data source code and record ID pairs in a JSON document with the following format:
{ "ENTITIES": [ { "DATA_SOURCE": "<data_source1>", "RECORD_ID": "<record_id1>" }, { "DATA_SOURCE": "<data_source2>", "RECORD_ID": "<record_id2>" }, . . . { "DATA_SOURCE": "<data_sourceN>", "RECORD_ID": "<record_idN>" } ] }- Specified by:
findNetworkByRecordIDin interfaceG2Engine- Parameters:
recordList- The JSON document containing the data source code and record ID pairs for the composite records of the desired entities.maxDegree- The maximum number of degrees for the path search between the specified entities.buildOutDegree- The number of relationship degrees to build out from each of the found entities.maxEntities- The maximum number of entities to build out to.response- TheStringBufferto write the JSON response document to.- Returns:
- Zero (0) on success and non-zero on failure.
-
findNetworkByRecordIDV2
public int findNetworkByRecordIDV2(String recordList, int maxDegree, int buildOutDegree, int maxEntities, int flags, StringBuffer response)
This method is used to find a network of entity relationships, surrounding the paths between a set of entities. The entities are identified by their composite records having the specified data source code and record ID pairs.
The composite records af the desired entities are identified by the data source code and record ID pairs in a JSON document with the following format:
{ "ENTITIES": [ { "DATA_SOURCE": "<data_source1>", "RECORD_ID": "<record_id1>" }, { "DATA_SOURCE": "<data_source2>", "RECORD_ID": "<record_id2>" }, . . . { "DATA_SOURCE": "<data_sourceN>", "RECORD_ID": "<record_idN>" } ] }- Specified by:
findNetworkByRecordIDV2in interfaceG2Engine- Parameters:
recordList- The JSON document containing the data source code and record ID pairs for the composite records of the desired entities.maxDegree- The maximum number of degrees for the path search between the specified entities.buildOutDegree- The number of relationship degrees to build out from each of the found entities.maxEntities- The maximum number of entities to build out to.flags- The flags to control how the operation is performed and specifically the content of the response JSON document.response- TheStringBufferto write the JSON response document to.- Returns:
- Zero (0) on success and non-zero on failure.
-
whyEntityByRecordID
public int whyEntityByRecordID(String dataSourceCode, String recordID, StringBuffer response)
This method determines why records are included in the resolved entity they belong to. The entity for the operation is the one having the record with the specified data source code and record ID.- Specified by:
whyEntityByRecordIDin interfaceG2Engine- Parameters:
dataSourceCode- The data source code for the composite record of the subject entity.recordID- The record ID for the composite record of the subject entity.response- TheStringBufferto write the JSON response document to.- Returns:
- Zero (0) on success and non-zero on failure.
-
whyEntityByRecordIDV2
public int whyEntityByRecordIDV2(String dataSourceCode, String recordID, int flags, StringBuffer response)
This method determines why records are included in the resolved entity they belong to. The entity for the operation is the one having the record with the specified data source code and record ID.- Specified by:
whyEntityByRecordIDV2in interfaceG2Engine- Parameters:
dataSourceCode- The data source code for the composite record of the subject entity.recordID- The record ID for the composite record of the subject entity.flags- The flags to control how the operation is performed and specifically the content of the response JSON document.response- TheStringBufferto write the JSON response document to.- Returns:
- Zero (0) on success and non-zero on failure.
-
whyEntityByEntityID
public int whyEntityByEntityID(long entityID, StringBuffer response)This method determines why records are included in the resolved entity they belong to. The entity is identified with the specified entity ID.- Specified by:
whyEntityByEntityIDin interfaceG2Engine- Parameters:
entityID- The entity ID of the subject entity.response- TheStringBufferto write the JSON response document to.- Returns:
- Zero (0) on success and non-zero on failure.
-
whyEntityByEntityIDV2
public int whyEntityByEntityIDV2(long entityID, int flags, StringBuffer response)This method determines why records are included in the resolved entity they belong to. The entity is identified with the specified entity ID.- Specified by:
whyEntityByEntityIDV2in interfaceG2Engine- Parameters:
entityID- The entity ID of the subject entity.flags- The flags to control how the operation is performed and specifically the content of the response JSON document.response- TheStringBufferto write the JSON response document to.- Returns:
- Zero (0) on success and non-zero on failure.
-
whyRecords
public int whyRecords(String dataSourceCode1, String recordID1, String dataSourceCode2, String recordID2, StringBuffer response)
This method determines how two records are related to each other.- Specified by:
whyRecordsin interfaceG2Engine- Parameters:
dataSourceCode1- The data source code for the first record.recordID1- The record ID for the first record.dataSourceCode2- The data source code for the second record.recordID2- The record ID for the second record.response- TheStringBufferto write the JSON response document to.- Returns:
- Zero (0) on success and non-zero on failure.
-
whyRecordsV2
public int whyRecordsV2(String dataSourceCode1, String recordID1, String dataSourceCode2, String recordID2, int flags, StringBuffer response)
This method determines how two records are related to each other.- Specified by:
whyRecordsV2in interfaceG2Engine- Parameters:
dataSourceCode1- The data source code for the first record.recordID1- The record ID for the first record.dataSourceCode2- The data source code for the second record.recordID2- The record ID for the second record.flags- The flags to control how the operation is performed and specifically the content of the response JSON document.response- TheStringBufferto write the JSON response document to.- Returns:
- Zero (0) on success and non-zero on failure.
-
whyEntities
public int whyEntities(long entityID1, long entityID2, StringBuffer response)This method determines how two entities are related to each other.- Specified by:
whyEntitiesin interfaceG2Engine- Parameters:
entityID1- The entity ID of the first entity.entityID2- The entity ID of the second entity.response- TheStringBufferto write the JSON response document to.- Returns:
- Zero (0) on success and non-zero on failure.
-
whyEntitiesV2
public int whyEntitiesV2(long entityID1, long entityID2, int flags, StringBuffer response)This method determines how two entities are related to each other.- Specified by:
whyEntitiesV2in interfaceG2Engine- Parameters:
entityID1- The entity ID of the first entity.entityID2- The entity ID of the second entity.flags- The flags to control how the operation is performed and specifically the content of the response JSON document.response- TheStringBufferto write the JSON response document to.- Returns:
- Zero (0) on success and non-zero on failure.
-
getRecord
public int getRecord(String dataSourceCode, String recordID, StringBuffer response)
This method is used to retrieve the stored record.- Specified by:
getRecordin interfaceG2Engine- Parameters:
dataSourceCode- The data source of the observation to search forrecordID- The record ID of the observation to search forresponse- AStringBufferfor returning the response document. If an error occurred, an error response is stored here.- Returns:
- Zero (0) on success and non-zero on failure.
-
getRecordV2
public int getRecordV2(String dataSourceCode, String recordID, int flags, StringBuffer response)
This method is used to retrieve the stored record.- Specified by:
getRecordV2in interfaceG2Engine- Parameters:
dataSourceCode- The data source of the observation to search forrecordID- The record ID of the observation to search forflags- The flags to control how the operation is performed and specifically the content of the response JSON document.response- AStringBufferfor returning the response document. If an error occurred, an error response is stored here.- Returns:
- Zero (0) on success and non-zero on failure.
-
exportJSONEntityReport
public long exportJSONEntityReport(int flags)
This is used to export entity data from known entities. This function returns an export-handle that can be read from to get the export data in JSON format. The export-handle should be read using the "G2_fetchNext" function, and closed when work is complete. Each output row contains the exported entity data for a single resolved entity.- Specified by:
exportJSONEntityReportin interfaceG2Engine- Parameters:
flags- A bit mask specifying control flags, such as "G2_EXPORT_INCLUDE_SINGLETONS". The default and recommended value is "G2_EXPORT_DEFAULT_FLAGS".- Returns:
- Returns an export handle that the entity data can be read from.
-
exportJSONEntityReportV3
public int exportJSONEntityReportV3(int flags, Result<Long> exportHandle)This is used to export entity data from known entities. This function returns an export-handle that can be read from to get the export data in JSON format. The export-handle should be read using the "G2_fetchNext" function, and closed when work is complete. Each output row contains the exported entity data for a single resolved entity.- Specified by:
exportJSONEntityReportV3in interfaceG2Engine- Parameters:
flags- A bit mask specifying control flags, such as "G2_EXPORT_INCLUDE_SINGLETONS". The default and recommended value is "G2_EXPORT_DEFAULT_FLAGS".exportHandle- TheResultobject for storing the export handle.- Returns:
- Zero (0) on success and non-zero on failure.
-
exportCSVEntityReportV2
public long exportCSVEntityReportV2(String csvColumnList, int flags)
This is used to export entity data from known entities. This function returns an export-handle that can be read from to get the export data in CSV format. The export-handle should be read using the "G2_fetchNext" function, and closed when work is complete. The first output row returned by the export-handle contains the JSON column headers as a string. Each following row contains the exported entity data.- Specified by:
exportCSVEntityReportV2in interfaceG2Engine- Parameters:
csvColumnList- Specify"*"to indicate "all columns", specify empty-string to indicate the "standard columns", otherwise specify a comma-separated list of column names.flags- A bit mask specifying other control flags, such as "G2_EXPORT_INCLUDE_SINGLETONS". The default and recommended value is "G2_EXPORT_DEFAULT_FLAGS".- Returns:
- Returns an export handle that the entity data can be read from.
-
exportCSVEntityReportV3
public int exportCSVEntityReportV3(String csvColumnList, int flags, Result<Long> exportHandle)
This is used to export entity data from known entities. This function returns an export-handle that can be read from to get the export data in CSV format. The export-handle should be read using the "G2_fetchNext" function, and closed when work is complete. The first output row returned by the export-handle contains the JSON column headers as a string. Each following row contains the exported entity data.- Specified by:
exportCSVEntityReportV3in interfaceG2Engine- Parameters:
csvColumnList- Specify"*"to indicate "all columns", specify empty-string to indicate the "standard columns", otherwise specify a comma-separated list of column names.flags- A bit mask specifying other control flags, such as "G2_EXPORT_INCLUDE_SINGLETONS". The default and recommended value is "G2_EXPORT_DEFAULT_FLAGS".exportHandle- TheResultobject for storing the export handle.- Returns:
- Returns an export handle that the entity data can be read from.
-
fetchNext
public String fetchNext(long exportHandle)
This function is used to read entity data from an export handle, one data row at a time.
-
fetchNextV3
public int fetchNextV3(long exportHandle, StringBuffer response)This function is used to read entity data from an export handle, one data row at a time.- Specified by:
fetchNextV3in interfaceG2Engine- Parameters:
exportHandle- The export handle to retrieve data fromresponse- TheStringBufferto write the next exported record to.- Returns:
- Zero (0) on success and non-zero on failure.
-
closeExport
public void closeExport(long exportHandle)
This function closes an export handle, to clean up system resources.- Specified by:
closeExportin interfaceG2Engine- Parameters:
exportHandle- The export handle of the export to close.
-
closeExportV3
public int closeExportV3(long exportHandle)
This function closes an export handle, to clean up system resources.- Specified by:
closeExportV3in interfaceG2Engine- Parameters:
exportHandle- The export handle of the export to close.- Returns:
- Zero (0) on success and non-zero on failure.
-
processRedoRecord
public int processRedoRecord(StringBuffer record)
Processes a redo record.- Specified by:
processRedoRecordin interfaceG2Engine- Parameters:
record- TBD: Need to find out if this is an input, an output or both.- Returns:
- Zero (0) on success and non-zero on failure.
-
processRedoRecordWithInfo
public int processRedoRecordWithInfo(int flags, StringBuffer record, StringBuffer response)Processes a redo record.- Specified by:
processRedoRecordWithInfoin interfaceG2Engine- Parameters:
flags- The flags to control how the operation is performed and specifically the content of the response JSON document.record- A returned JSON document containing the info.response- AStringBufferfor returning the response document. If an error occurred, an error response is stored here.- Returns:
- Zero (0) on success and non-zero on failure.
-
getRedoRecord
public int getRedoRecord(StringBuffer record)
Retrieves a pending redo record from the reevaluation queue.- Specified by:
getRedoRecordin interfaceG2Engine- Parameters:
record- AStringBufferto write the redo record to.- Returns:
- Zero (0) on success and non-zero on failure.
-
countRedoRecords
public long countRedoRecords()
Gets the number of redo records waiting to be processed.- Specified by:
countRedoRecordsin interfaceG2Engine- Returns:
- The number of redo records waiting to be processed.
-
process
public int process(String record)
This method will send a record for processing in g2. It is a synchronous call, i.e. it will wait until g2 actually processes the record. This is similar toG2Engine.process(String,StringBuffer)method, but this variant does not return a response. NOTE: there are performance benefits of calling this variant of process that does not require a response.
-
process
public int process(String record, StringBuffer response)
This method will send a record for processing in g2. It is a synchronous call, i.e. it will wait until g2 actually processes the record, and then return a response message. This is similar toG2Engine.process(String)method, but this variant returns a response. NOTE: there are performance benefits of calling the variant of process that does not require a response.- Specified by:
processin interfaceG2Engine- Parameters:
record- An input record to be processed.response- AStringBufferfor returning the response document.- Returns:
- Zero (0) on success and non-zero on failure.
-
processWithInfo
public int processWithInfo(String record, int flags, StringBuffer response)
This method will send a record for processing in g2. It is a synchronous call, i.e. it will wait until g2 actually processes the record. This is similar toG2Engine.process(String,StringBuffer)method, but this variant does not return a response. NOTE: there are performance benefits of calling this variant of process that does not require a response. Also returns a list of modified resolved entities- Specified by:
processWithInfoin interfaceG2Engine- Parameters:
record- An input record to be processed.flags- The flags to control how the operation is performed and specifically the content of the response JSON document.response- AStringBufferfor returning the response document. If an error occurred, an error response is stored here.- Returns:
- Zero (0) on success and non-zero on failure.
-
-