Package primarydatamanager.primarydataservice

Examples of primarydatamanager.primarydataservice.PrimaryDataService


     * For Testing only, don't use this!
     *
     * @param args Arguments
     */
    public static void main(String[] args) {
        PrimaryDataService pds = new SimplePDS();
        pds.execute("temp", System.out);
    }
View Full Code Here


    mActiveThreadCount++;

    boolean isFinished = false;
    do {
      // Get the next job
      PrimaryDataService pds = null;
     
      synchronized (mPDSList) {
        if (mPDSList.isEmpty()) {
          isFinished = true;
        } else {
          pds = mPDSList.removeFirst();
        }
      }
     
      if (pds != null) {
        String dir = mRawDir.getAbsolutePath();
        File logFile=new File(mLogDir,pds.getClass().getName()+".txt");
        try {
          FileOutputStream out=new FileOutputStream(logFile);
          PrintStream errOut=new PrintStream(out);
          if (mProperties != null) {
            pds.setParameters(mProperties);
          }
          boolean thereWereErrors = pds.execute(dir, errOut);         
          if (thereWereErrors) {
            mLog.warning("There were errors during the execution of primary "
                + "data service " + pds.getClass().getName() + ". See log file: "
                + logFile.getAbsolutePath());
          }else{
            mLog.fine(pds.getClass().getName()+ " terminated normally");
            logFile.delete();
          }
          errOut.close();
        }catch(Exception exc) {
          mLog.log(Level.SEVERE, "Error executing primary data service "+pds.getClass().getName(), exc);
        }
      }
    } while (! isFinished);
   
    mActiveThreadCount--;
View Full Code Here

TOP

Related Classes of primarydatamanager.primarydataservice.PrimaryDataService

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.