Using Java API - Spectrum_Routing_for_Big_Data - 3.0

Global Routing SDK Developer Guide

Product type
Software
Portfolio
Locate
Product family
Spectrumâ„¢ software
Product
Spatial Big Data > Routing for Big Data
Version
3.0
ft:locale
en-US
Product name
Routing for Big Data
ft:title
Global Routing SDK Developer Guide
Copyright
2024
First publish date
2007
ft:lastEdition
2024-10-15
ft:lastPublication
2024-10-15T10:39:39.482000

The main entry point for the Global Routing API is described by the IGRAInstance, which is implemented by the GRAInstanceImpl class.

GRAInstanceImpl class can be instantiated by providing an object of either of the following two classes:

  1. File: The File object created with the path to the routing.properties file.
  2. Options: The Options class where you can specify all of the same parameters as the File object, however define them inline.
The Options class has the following mandatory parameter:
Field Name Type Description
dbConfigJSON File File object with the path of the database configuration JSON file

The Options class has the ability to specify the same optional parameters as defined in the routing.properties file. Descriptions for these properties can be found in Configuring Routing Properties and Data Resources.

You can instantiate the GRAInstanceImpl using one of the following ways:

IGRAInstance gra = IGRAInstanceFactory.getInstance(PROPERTY_FILE_OBJECT);

Where PROPERTY_FILE_OBJECT is the File object containing all the necessary configuration and location of dbList.json file containing database resources information.

or

IGRAInstance gra = IGRAInstanceFactory.getInstance(dbConfigJSON, options);

Where dbConfigJSON is the JSON file containing database resources information and options is the instance of Options class containing values for optional parameters.

IGRAInstance gra = IGRAInstanceFactory.getInstance(resourcesConfiguration, options);

Where resourcesConfiguration is the instance of DBResourcesConfiguration class containing database resources information and options is the instance of Options class containing values for optional parameters.

Note: The IGRAInstance is a heavy weight object and you should not create more than one instance in a single application. It is important to call the destroy method for the IGRAInstance once it is no longer required.

Once you get an instance of IGRAInstance, the routing capabilities methods can then be called.