Class PBThreeTierETLPVLookup


  • public final class PBThreeTierETLPVLookup
    extends Object
    Holds runtime state for ETL. For now, gets all of the info from PVTypeInfo.
    Version:
    4-Jun-2012, Luofeng Li:added codes to create one ETL thread for each ETL
    Author:
    rdh
    • Constructor Detail

      • PBThreeTierETLPVLookup

        public PBThreeTierETLPVLookup​(ConfigService configService)
    • Method Detail

      • postStartup

        public void postStartup()
        Initialize the ETL background scheduled executors and create the runtime state for various ETL components.
      • deleteETLJobs

        public void deleteETLJobs​(String pvName)
        Cancel the ETL jobs for each of the ETL lifetime transitions and also remove from internal structures.
        Parameters:
        pvName - The name of PV.
      • getLookupItemsForPV

        public LinkedList<ETLPVLookupItems> getLookupItemsForPV​(String pvName)
        Get the internal state for all the ETL lifetime transitions for a pv
        Parameters:
        pvName - The name of PV.
        Returns:
        LinkedList  
      • getLatestEventFromDataStores

        public Event getLatestEventFromDataStores​(String pvName)
                                           throws IOException
        Get the latest (last known) entry from the stores for this PV.
        Parameters:
        pvName - The name of PV.
        Returns:
        Event LatestEventFromDataStores
        Throws:
        IOException -  
      • manualControlForUnitTests

        public void manualControlForUnitTests()
        Some unit tests want to run the ETL jobs manually; so we shut down the threads. We should probably write a pausable thread pool executor Use with care.
      • addETLJobsForUnitTests

        public void addETLJobsForUnitTests​(String pvName,
                                           PVTypeInfo typeInfo)