public final class IGRAInstanceFactory extends Object
Factory class to get instance of IGRAInstance. There are two types of IGRAInstance
1. Dynamic Instance - Will load the changes in the configuration files (both properties and JSON files) on the next
request after the changes have been made. User don't have to restart the application for changes in configuration
files to take effect.
2. Static Instance - Will not reload the changes in the configuration files. User will have to restart the application for
changes to take effect.
To obtain instance of IGRAInstance user needs to call getInstance method in IGRAInstanceFactory
IGRAInstance gra = IGRAInstanceFactory.getInstance(File)
IGRAInstance gra = IGRAInstanceFactory.getInstance(File, Options)
Calling the getInstance method which take File as an argument, will either return Dynamic instance or static instance
depending upon the value of dynamicLoading param in properties configuration file. If dynamicLoading is true, dynamic instance
will be returned and if dynamicLoading is false, static instance will be returned.
Calling the getInstance method which takes Options as an argument, will always return static object.
| Modifier and Type | Method and Description |
|---|---|
static IGRAInstance |
getInstance(DBResourcesConfiguration resourcesConfiguration,
Options options)
Creates a static instance of
IGRAInstance. |
static IGRAInstance |
getInstance(File params)
Creates either dynamic or static instance of
IGRAInstance depending upon the value of dynamicLoading param
in configuration file. |
static IGRAInstance |
getInstance(File dbConfigJSON,
Options options)
Creates a static instance of
IGRAInstance. |
public static IGRAInstance getInstance(File params) throws RoutingException
IGRAInstance depending upon the value of dynamicLoading param
in configuration file.
If dynamicLoading= true, dynamic instance is returned.
If dynamicLoading=false, static instance is returned.params - - File containing all the configuration parameters for IGRAInstanceIGRAInstance which can be used to invoke routing operations.RoutingException - if some problem is encountered while creating IGRAInstancepublic static IGRAInstance getInstance(File dbConfigJSON, Options options) throws RoutingException
IGRAInstance.dbConfigJSON - - JSON File containing databases and data sets configuration.options - - containing all the configuration settings for IGRAInstanceIGRAInstance which can be used to invoke routing operations.RoutingException - if some problem is encountered while creating IGRAInstancepublic static IGRAInstance getInstance(DBResourcesConfiguration resourcesConfiguration, Options options) throws RoutingException
IGRAInstance.resourcesConfiguration - - DBResourcesConfiguration object containing database configuration to used with IGRAInstance.options - - containing all the configuration settings for IGRAInstanceIGRAInstance which can be used to invoke routing operations.RoutingException - if some problem is encountered while creating IGRAInstance