public final void fire() { fire(null); } }
/** * To use in unti-tests. Start a node and blocks the thread until the nodes stops. * * @throws InterruptedException */ private void startAndWaitEnd() throws InterruptedException { eventReady.fire(null); if (!options.has("test")) synchronized (parser) { parser.wait(); } }
private void resyncEnded() { if (resyncingItem.getResyncingState() == ResyncingItemProcessingState.COMMIT_FAILED) { //TODO: how to call this from ResyncProcessor? //rollbackChanges(stateWas); executorService.schedule(() -> itemSanitationFailed(resyncingItem.record), 0, TimeUnit.SECONDS); } else { executorService.schedule(() -> itemSanitationDone(resyncingItem.record), 0, TimeUnit.SECONDS); } finishEvent.fire(resyncingItem); stopResync(); }
private void dbSanitationFinished() { sanitationFinished.fire(); nodeStats.init(ledger,config); pulseCollectStats(); }
@Override public void run() { ItemResult r = node.checkItem(contract.getId()); System.out.println("Complex contract state: " + r.state); if(r.state == ItemState.DECLINED) ae.fire(); } }, 0, 500);
@Override public void run() { ItemResult r = node.checkItem(contract.getId()); System.out.println("Complex contract state: " + r.state); if(r.state == ItemState.APPROVED) ae.fire(); } }, 0, 500);
@Override public void run() { ItemResult r = node.checkItem(contract.getId()); System.out.println("Complex contract state: " + r.state); if(r.state == ItemState.DECLINED) ae.fire(); } }, 0, 500);
@Override public void run() { ItemResult r = node.checkItem(contract.getId()); System.out.println("Complex contract state: " + r.state); if(r.state == ItemState.APPROVED) ae.fire(); } }, 0, 500);
@Override public void run() { if( ItemState.UNDEFINED == node.checkItem(c.getId()).state) ae.fire(); } }, 100, 500);
@Override public void run() { if( ItemState.UNDEFINED == node.checkItem(c.getId()).state) ae.fire(); } }, 100, 500);
@Override public void run() { boolean all_is_approved = true; for (Node n : nodesMap_s.values()) { ItemResult r = n.checkItem(contract.getId()); System.out.println(">>>Node: " + n.toString() + " state: " + r.state); if(r.state != ItemState.UNDEFINED) { all_is_approved = false; } } if(all_is_approved) ae.fire(); } }, 0, 1000);
@Override public void run() { boolean all_is_approved = true; for (Node n : nodesMap_s.values()) { ItemResult r = n.checkItem(c.getId()); System.out.println(">>>Node: " + n.toString() + " state: " + r.state); if(r.state != ItemState.UNDEFINED) { all_is_approved = false; } } if(all_is_approved) ae.fire(); } }, 0, 1000);
@Override public void run() { boolean all_is_approved = true; for (Node n : nodesMap_s.values()) { ItemResult r = n.checkItem(contract.getId()); System.out.println(">>>Node: " + n.toString() + " state: " + r.state); if(r.state != ItemState.UNDEFINED) { all_is_approved = false; } } if(all_is_approved) ae.fire(); } }, 0, 1000);
@Override public void run() { boolean all_is_approved = true; for (Node n : nodesMap_s.values()) { ItemResult r = n.checkItem(c.getId()); System.out.println(">>>Node: " + n.toString() + " state: " + r.state); if(r.state != ItemState.UNDEFINED) { all_is_approved = false; } } if(all_is_approved) ae.fire(); } }, 0, 1000);
@Override public void run() { boolean all_is_approved = true; for (Node n : nodesMap_s.values()) { // System.out.println(n.getLedger().getRecord(c.getId())); ItemResult r = n.checkItem(c.getId()); System.out.println(">>>Node: " + n.toString() + " state: " + r.state); if(r.state != ItemState.DECLINED) { all_is_approved = false; } } if(all_is_approved) ae.fire(); } }, 0, 1000);
@Override public void run() { assertEquals(true, rc.countPulse()); counts++; System.out.println("counts: " + counts); if(counts >= maxCounts) { cancel(); ae.fire(); } } }, 0, 100);
@Override public void run() { ItemResult r = node.checkItem(parcel.getPayloadContract().getId()); System.out.println("Complex contract state: " + r.state); if(r.state == ItemState.DECLINED) ae.fire(); } }, 0, 500);
@Override public void run() { ItemResult r = node.checkItem(parcel.getPayloadContract().getId()); System.out.println("Complex contract state: " + r.state); if(r.state == ItemState.DECLINED) ae.fire(); } }, 0, 500);
@Override public void run() { assertEquals(true, rc.countPulse()); counts++; System.out.println("counts: " + counts); if(counts >= maxCounts) { cancel(); ae.fire(); } } }, 0, 300);