Package com.dtrules.samples.bookpreview.datamodel

Examples of com.dtrules.samples.bookpreview.datamodel.DataObj


    this.t   = t;
    this.app = app;
  }
 
  public void run () {
    DataObj job = app.next();
    while(job != null){
      String err=null;
          if(app.db_delay!=0){
              try {
                  Thread.sleep(app.db_delay);
View Full Code Here


   * This method is going to watch the queue in the BookPreviewApp, and fill
   * it with test cases until until full (i.e. has level many jobs in it).
   */
  public void fill() {
    while(app.jobsWaiting()<level){
        DataObj request = generate();
      app.jobs.add(request);
    }
  }
View Full Code Here

    }
    if(pulled > numCases)return null;
    if(jobs.size()<50){
      genCase.fill();
    }
    DataObj r = jobs.remove(0);
    numOpenBooks += ((Request) r).getCustomer().getOpen_books().size();
    return r;
  }
View Full Code Here

                if(i>0 && i%inc   ==0 )ostream.print(i+" ");
                if(i>0 && i%lines ==0 )ostream.print("\n");
                OutputStream out = new FileOutputStream(filename(name,numCases,i));
                DataMap datamap = session.getDataMap(session.getMapping(),testObj.getRuleSetName());
               
                DataObj request = generate();
                request.write2DataMap(datamap);
                datamap.print(out);
            }
        } catch (FileNotFoundException e) {
            ostream.println(e.toString());
            e.printStackTrace();
View Full Code Here

        if(i>0 && i%inc   ==0 )ostream.print(i+" ");
        if(i>0 && i%lines ==0 )ostream.print("\n");
        OutputStream out = new FileOutputStream(filename(name,numCases,i));
                DataMap datamap = session.getDataMap(session.getMapping(),ruleset);
       
                DataObj request = generate();
        request.write2DataMap(datamap);
                datamap.print(out);
      }
    } catch (FileNotFoundException e) {
      ostream.println(e.toString());
      e.printStackTrace();
View Full Code Here

        if(i>0 && i%inc   ==0 )ostream.print(i+" ");
        if(i>0 && i%lines ==0 )ostream.print("\n");
        OutputStream out = new FileOutputStream(filename(name,numCases,i));
                DataMap datamap = session.getDataMap(session.getMapping(),testObj.getRuleSetName());
       
                DataObj request = generate();
        request.write2DataMap(datamap);
                datamap.print(out);
      }
    } catch (FileNotFoundException e) {
      ostream.println(e.toString());
      e.printStackTrace();
View Full Code Here

TOP

Related Classes of com.dtrules.samples.bookpreview.datamodel.DataObj

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.