IoT DAS Frameworks - IT Infra Monitoring and Analytics/IOT_Applications/Performance_Dashboard_Application(Reference App)/source/SA-DashBoard/src/java/com/merit/dashboard/Controller.java
private void createThread(String forCustomer, String sz_tomcat_home) {
    	//forCustomerName = forCustomer;
        //long iTime = 1000*60*60;
        long iTime = 1000*60;
        int count = 0;
        String[] tVals = {"Hour", "Day", "Week", "Month", "Year"};
        while (true) {
        	ArrayList<String> al_customer_list = getCustomerList();

            System.out.println("\nCustomer List Size==="+al_customer_list.size()+"\n");
            log.debug("\nCustomer List Size==="+al_customer_list.size()+"\n");

            if (al_customer_list.size() > 0) {
                for (int j = 0; j < al_customer_list.size(); j++) {
                    for (int i = 0; i < tVals.length; i++) {
                        generateDirectoryStructureByCustomerID(al_customer_list.get(j), tVals[i], sz_tomcat_home);
                        runTheCode(al_customer_list.get(j), tVals[i], sz_tomcat_home);
                        count++;
                        System.out.println("************************End Of "+tVals[i] + " Generated " + count+" *******************");
                    }
                }
                try {
                	Thread.sleep(iTime);
                	count = 0;
                }
                catch (InterruptedException interruptedException) {
                	System.out.println(interruptedException.getMessage());
                	log.error(interruptedException.getMessage());
                }
            } else {
                System.out.println("********Customer List Empty ***********");
            }
        }
    }
/** This method we are calling generateDirectoryStructureByCustomerID() and runTheCode() method
     * @param forCustomer customerId
     * @param sz_tomcat_home where you want to create a directory
     * */
This method we are calling generateDirectoryStructureByCustomerID() and runTheCode() method
@param forCustomer customerId
@param sz_tomcat_home where you want to create a directory
This method we are calling generateDirectoryStructureByCustomerID () and runTheCode () method @param forCustomer customerId @param sz_tomcat_home where you want to create a directory
private void createThread(String forCustomer, String sz_tomcat_home) {
        long iTime = 1000*60;
        int count = 0;
        String[] tVals = {"Hour", "Day", "Week", "Month", "Year"};
        while (true) {
        	ArrayList<String> al_customer_list = getCustomerList();
            System.out.println("\nCustomer List Size==="+al_customer_list.size()+"\n");
            log.debug("\nCustomer List Size==="+al_customer_list.size()+"\n");
            if (al_customer_list.size() > 0) {
                for (int j = 0; j < al_customer_list.size(); j++) {
                    for (int i = 0; i < tVals.length; i++) {
                        generateDirectoryStructureByCustomerID(al_customer_list.get(j), tVals[i], sz_tomcat_home);
                        runTheCode(al_customer_list.get(j), tVals[i], sz_tomcat_home);
                        count++;
                        System.out.println("************************End Of "+tVals[i] + " Generated " + count+" *******************");
                    }
                }
                try {
                	Thread.sleep(iTime);
                	count = 0;
                }
                catch (InterruptedException interruptedException) {
                	System.out.println(interruptedException.getMessage());
                	log.error(interruptedException.getMessage());
                }
            } else {
                System.out.println("********Customer List Empty ***********");
            }
        }
    }
private void createThread ( String forCustomer , String sz_tomcat_home ) { long iTime = 1000 * 60 ; int count = 0 ; String [ ] tVals = { "Hour" , "Day" , "Week" , "Month" , "Year" } ; while ( true ) { ArrayList < String > al_customer_list = getCustomerList ( ) ; System . out . println ( "\nCustomer List Size===" + al_customer_list . size ( ) + "\n" ) ; log . debug ( "\nCustomer List Size===" + al_customer_list . size ( ) + "\n" ) ; if ( al_customer_list . size ( ) > 0 ) { for ( int j = 0 ; j < al_customer_list . size ( ) ; j ++ ) { for ( int i = 0 ; i < tVals . length ; i ++ ) { generateDirectoryStructureByCustomerID ( al_customer_list . get ( j ) , tVals [ i ] , sz_tomcat_home ) ; runTheCode ( al_customer_list . get ( j ) , tVals [ i ] , sz_tomcat_home ) ; count ++ ; System . out . println ( "************************End Of " + tVals [ i ] + " Generated " + count + " *******************" ) ; } } try { Thread . sleep ( iTime ) ; count = 0 ; } catch ( InterruptedException interruptedException ) { System . out . println ( interruptedException . getMessage ( ) ) ; log . error ( interruptedException . getMessage ( ) ) ; } } else { System . out . println ( "********Customer List Empty ***********" ) ; } } }
This method we are calling generateDirectoryStructureByCustomerID() and runTheCode() method
 @param forCustomer customerId
 @param sz_tomcat_home where you want to create a directory
This method we are calling generateDirectoryStructureByCustomerID () and runTheCode () method @param forCustomer customerId @param sz_tomcat_home where you want to create a directory
//forCustomerName = forCustomer; //long iTime = 1000*60*60;