/** * Directs a parsing request to a ParserMediator.<br> * Referring to the given configuration (id), it directs the request of parsing a given log-file * (path) to a ParserMediator. * * @param path path of the log file, which has to be parsed * @return whether parsing this log file was successful, to a certain point; therefore {@linkplain * ParserMediator} * @see ParserMediator */ public boolean parseLogFile(String path) { if (path == null) { throw new IllegalArgumentException(); } // Printer.ptest("creating tables: " + createDBTables()); // testing // Printer.ptest("Start parsing task."); // long start = System.currentTimeMillis(); // checks whether a request is allowed if (!isInitialized()) { Printer.pproblem("Configurations & mediators not initalized!"); Printer.print("-> Parsing not possible!"); return false; } if (!(tablesAreCreated())) { Printer.pproblem("Tables not created. Request not possible"); return false; } // directs the request if (!parsMedi.parseLogFile(path)) { Printer.pfail("Parsing."); return false; } else { Printer.psuccess("Parsing."); } // testing // Printer.ptest("Completed parsing task. Time needed: " + (System.currentTimeMillis() - // start)); // precompute strings for the web page selection boxes after parsinng computeDimensionData(); return true; }
/** * Sets the pool size. * * @param poolsize size for the pool; must be between 1 and MAX_POOLSIZE */ public void setPoolsizeParsing(int poolsize) { parsMedi.setPoolsizeParsing(poolsize); }