Package com.ibm.fhir.bucket.app
Class Main
- java.lang.Object
- 
- com.ibm.fhir.bucket.app.Main
 
- 
 public class Main extends java.lang.ObjectThe fhir-bucket application for loading data from COS into a FHIR server and tracking the returned ids along with response times.
- 
- 
Constructor SummaryConstructors Constructor Description Main()
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddDbProperty(java.lang.String arg)Add the property from the arg given in the form of: param=valuevoidbootstrapDb()Create or update the database schema to the latest definitionvoidcheckConfig()Rudimentary check of the configuration to make sure the basics have been providedvoidconfigure()Set up the database configuration we are going to use to coordinate loading activities.protected VersionHistoryServicecreateVersionHistoryService()Create the version history table and a simple service which is used to access information from it.protected voidloadCosProperties(java.lang.String filename)Load COS properties from the given properties fileprotected voidloadDbProperties(java.lang.String filename)Load DB properties from the given properties fileprotected voidloadFhirClientProperties(java.lang.String filename)Load the FHIR client properties from the given properties filestatic voidmain(java.lang.String[] args)voidparseArgs(java.lang.String[] args)Parse command line argumentsvoidprocess()Choose which mode of the program we want to run: - create the schema - drive reindex - scan and loadprotected voidscanAndLoad()Start the processing threads and wait until we get told to stopvoidsetupDb2Repository()Set up the connection pool and transaction provider for connecting to a DB2 databasevoidsetupDerbyRepository()Set up the connection pool and transaction provider for connecting to a Derby databasevoidsetupPostgresRepository()Set up the connection pool and transaction provider for connecting to a DB2 databaseprotected voidshutdown()Called by the shutdown hook to stop everything in an orderly fashion
 
- 
- 
- 
Method Detail- 
parseArgspublic void parseArgs(java.lang.String[] args) Parse command line arguments- Parameters:
- args-
 
 - 
loadCosPropertiesprotected void loadCosProperties(java.lang.String filename) Load COS properties from the given properties file- Parameters:
- filename-
 
 - 
loadFhirClientPropertiesprotected void loadFhirClientProperties(java.lang.String filename) Load the FHIR client properties from the given properties file- Parameters:
- filename-
 
 - 
loadDbPropertiesprotected void loadDbProperties(java.lang.String filename) Load DB properties from the given properties file- Parameters:
- filename-
 
 - 
addDbPropertyprotected void addDbProperty(java.lang.String arg) Add the property from the arg given in the form of: param=value- Parameters:
- arg-
 
 - 
checkConfigpublic void checkConfig() Rudimentary check of the configuration to make sure the basics have been provided
 - 
configurepublic void configure() Set up the database configuration we are going to use to coordinate loading activities. Only one instance should be performing the schema update, so we need a special table which can be used to serialize the schema update process and avoid race conditions.
 - 
setupDerbyRepositorypublic void setupDerbyRepository() Set up the connection pool and transaction provider for connecting to a Derby database
 - 
setupDb2Repositorypublic void setupDb2Repository() Set up the connection pool and transaction provider for connecting to a DB2 database
 - 
setupPostgresRepositorypublic void setupPostgresRepository() Set up the connection pool and transaction provider for connecting to a DB2 database
 - 
createVersionHistoryServiceprotected VersionHistoryService createVersionHistoryService() Create the version history table and a simple service which is used to access information from it.- Throws:
- java.sql.SQLException
 
 - 
bootstrapDbpublic void bootstrapDb() Create or update the database schema to the latest definition
 - 
shutdownprotected void shutdown() Called by the shutdown hook to stop everything in an orderly fashion
 - 
processpublic void process() Choose which mode of the program we want to run: - create the schema - drive reindex - scan and load
 - 
scanAndLoadprotected void scanAndLoad() Start the processing threads and wait until we get told to stop
 - 
mainpublic static void main(java.lang.String[] args) - Parameters:
- args-
 
 
- 
 
-