com.cloudtran.api.persist
Interface ICloudTranOverallLoader


public interface ICloudTranOverallLoader

The "OverallLoader" is the class that loads the database and other data stores into the in-memory grid. To use this class at run-time, this class must have a load() method, which coordinates the overall loading of the in-memory grid from the datasources.

See the manual's section on Controlling The Loading Process"> for information about the initial (start of day) loading and re-loading, which is context for the methods in this service.

The normal implementor of this class is com.cloudtran.persist.JdbcLoaderFramework, which is generated into the "..._CtFramework" project in the Eclipse Workspace, e.g. at MyProject_CtFramework/src/com/cloudtran/persist/JdbcLoaderFramework.java

If you write you own loader framework, you must:

  • create the class which implements this interface
  • specify it in the "ct.persist.overallLoaderClass" configuration property, which is the hook into CloudTran to control the data loading process. This interface has the load() method - one of these can coordinate the overall loading of the in-memory data grid from the datasources.

    Your loader framework class can inherit from the JdbcLoaderFramework class and use methods in that class to handle tables for standard functionality. This means you only have to worry about loading any specialised (non-JDBC) data sources.


    Method Summary
     void initialiseLastAllocatedPrimaryKeys()
               
     void load(ICloudTranInjector injector)
              Load the data into the in-memory grid, from the datastores, via the configured datasources.
     

    Method Detail

    initialiseLastAllocatedPrimaryKeys

    void initialiseLastAllocatedPrimaryKeys()

    load

    void load(ICloudTranInjector injector)
    Load the data into the in-memory grid, from the datastores, via the configured datasources. Objects read from the datasources can be written into the IMDB using the supplied injector parameter.

    The JDBCLoader.java is available as a subroutine - see CloudTranDefaultLoader.

    This method is only called at start of day if the configuration parameter
        ct.persist.loadAtStartOfDay is true. The properties parameter contains the datasource infromation for every enity and for every tenant.