public void checkTimer() { completionTimer.check(); }
public void checkTimer() { completionTimer.check(); }
public void checkTimer(String name) { Timer t = getTimer(name); if (t == null) throw new UnsupportedOperationException("Timer " + name + " does not exist!"); t.check(); }
public void checkTimer(String name) { Timer t = getTimer(name); if (t == null) throw new UnsupportedOperationException("Timer " + name + " does not exist!"); t.check(); }
kb.timers.getTimer( "classify" ).check();
kb.timers.getTimer( "classify" ).check();
public void addBranch(Branch newBranch) { abox.getBranches().add(newBranch); if (newBranch.getBranch() != abox.getBranches().size()) { throw new RuntimeException("Invalid branch created: " + newBranch.getBranch() + " != " + abox.getBranches().size()); } completionTimer.check(); // CHW - added for incremental deletion support if (PelletOptions.USE_INCREMENTAL_DELETION) { abox.getKB().getDependencyIndex().addBranchAddDependency(newBranch); } }
public void addBranch(Branch newBranch) { abox.getBranches().add(newBranch); if (newBranch.getBranch() != abox.getBranches().size()) { throw new RuntimeException("Invalid branch created: " + newBranch.getBranch() + " != " + abox.getBranches().size()); } completionTimer.check(); // CHW - added for incremental deletion support if (PelletOptions.USE_INCREMENTAL_DELETION) { abox.getKB().getDependencyIndex().addBranchAddDependency(newBranch); } }
/** * Check if the elapsed time is greater than the timeout limit and throw a TimeoutException * if that is the case. Check the parent timer if there is one. * * @throws TimeoutException */ public void check() throws TimeoutException, TimerInterruptedException { if ( interrupted ) { interrupted = false; throw new TimerInterruptedException("Timer " + getName() + " interrupted."); } long elapsed = getElapsed(); if (timeout != NO_TIMEOUT && elapsed > timeout) { throw new TimeoutException("Running time of "+name+" exceeded timeout of "+timeout); } if (parent != null) parent.check(); }
private boolean realizeByIndividuals() { monitor.setProgressLength( kb.getIndividuals().size() ); monitor.taskStarted(); Iterator<Individual> i = kb.getABox().getIndIterator(); for( int count = 0; i.hasNext(); count++ ) { Individual x = i.next(); monitor.incrementProgress(); kb.timers.getTimer( "realize" ).check(); if( monitor.isCanceled() ) { return false; } if( log.isLoggable( Level.FINER ) ) { log.finer( count + ") Realizing " + format( x.getName() ) + " " ); } realize(x); } monitor.taskFinished(); return true; }
/** * Check if the elapsed time is greater than the timeout limit and throw a TimeoutException * if that is the case. Check the parent timer if there is one. * * @throws TimeoutException */ public void check() throws TimeoutException, TimerInterruptedException { if ( interrupted ) { interrupted = false; throw new TimerInterruptedException("Timer " + getName() + " interrupted."); } long elapsed = getElapsed(); if (timeout != NO_TIMEOUT && elapsed > timeout) { throw new TimeoutException("Running time of "+name+" exceeded timeout of "+timeout); } if (parent != null) parent.check(); }
kb.timers.getTimer( "realize" ).check();
kb.timers.getTimer( "realize" ).check();
completionTimer.check();
completionTimer.check();
private boolean realizeByConcepts() { monitor.setProgressLength( classes.size() + 2 ); monitor.taskStarted(); if (markedNodes == null) { markedNodes = CollectionUtils.makeList(); } else { clearMarks(); } Collection<ATermAppl> individuals = kb.getIndividuals(); if( !individuals.isEmpty() ) { realizeByConcept( ATermUtils.TOP, individuals ); } kb.timers.getTimer( "realize" ).check(); if( monitor.isCanceled() ) { return false; } monitor.taskFinished(); return true; }
private boolean realizeByConcepts() { monitor.setProgressLength( classes.size() + 2 ); monitor.taskStarted(); if (markedNodes == null) { markedNodes = CollectionUtils.makeList(); } else { clearMarks(); } Collection<ATermAppl> individuals = kb.getIndividuals(); if( !individuals.isEmpty() ) { realizeByConcept( ATermUtils.TOP, individuals ); } kb.timers.getTimer( "realize" ).check(); if( monitor.isCanceled() ) { return false; } monitor.taskFinished(); return true; }
abox.stats.backtracks++; while( !branchFound ) { completionTimer.check();
kb.timers.getTimer( "realize" ).check();
completionTimer.check();