/** * Add a chore procedure to the executor * @param chore the chore to add */ public void addChore(ProcedureInMemoryChore<TEnvironment> chore) { chore.setState(ProcedureState.WAITING_TIMEOUT); timeoutExecutor.add(chore); }
private void execInlineChore(InlineChore chore) { chore.run(); add(chore); }
/** * Start the workers. */ public void startWorkers() throws IOException { if (!running.compareAndSet(false, true)) { LOG.warn("Already running"); return; } // Start the executors. Here we must have the lastProcId set. LOG.trace("Start workers {}", workerThreads.size()); timeoutExecutor.start(); for (WorkerThread worker: workerThreads) { worker.start(); } // Internal chores timeoutExecutor.add(new WorkerMonitor()); // Add completed cleaner chore addChore(new CompletedProcedureCleaner<>(conf, store, procExecutionLock, completed, nonceKeysToProcIdsMap)); }
timeoutExecutor.add(proc); });
timeoutExecutor.add(procedure); } else if (!suspended) {
break; case WAITING_TIMEOUT: timeoutExecutor.add(procedure); break; default:
private void execInlineChore(InlineChore chore) { chore.run(); add(chore); }
/** * Add a chore procedure to the executor * @param chore the chore to add */ public void addChore(ProcedureInMemoryChore<TEnvironment> chore) { chore.setState(ProcedureState.WAITING_TIMEOUT); timeoutExecutor.add(chore); }
/** * Add a chore procedure to the executor * @param chore the chore to add */ public void addChore(final ProcedureInMemoryChore chore) { chore.setState(ProcedureState.WAITING_TIMEOUT); timeoutExecutor.add(chore); }
private void execInlineChore(InlineChore chore) { chore.run(); add(chore); }
timeoutExecutor.add(new WorkerMonitor());
for (Procedure proc: waitingSet) { proc.afterReplay(getEnvironment()); timeoutExecutor.add(proc);
LOG.trace("Added to timeoutExecutor " + procedure); timeoutExecutor.add(procedure); } else if (!suspended) {
timeoutExecutor.add(proc); });
timeoutExecutor.add(procedure); } else if (!suspended) {
break; case WAITING_TIMEOUT: timeoutExecutor.add(procedure); break; default:
break; case WAITING_TIMEOUT: timeoutExecutor.add(procedure); break; default: