PipePubImpl(OnAvailable flow) { super(Result.ignore()); Objects.requireNonNull(flow); _flow = flow; }
PipePubImpl(Function<Pipe<T>,OnAvailable> onOk) { super(Result.ignore()); Objects.requireNonNull(onOk); _onOk = onOk; }
public void run(Runnable task) { ClassLoader loader = Thread.currentThread().getContextClassLoader(); _taskService.run(task, loader, Result.ignore()); }
public void fsyncSegment(SegmentStream sOut) { if (sOut != null) { sOut.fsync(Result.ignore()); } }
void close() { ServiceRefAmp linkServiceRef = _linkServiceRef; if (linkServiceRef != null) { linkServiceRef.close(Result.ignore()); } }
public void restoreTable() { _tableBuilder.create(_tableManager, Result.ignore()); } }
@Override public void afterBatch(StubAmp stub) { onSave(Result.ignore()); }
@Override public void accept(A value) { if (_isFirst) { _isFirst = false; _accum = value; } else { _combiner.accept(_accum, value, Result.ignore()); } }
@Override public void addModifiedChild(StubAmp actor) { Objects.requireNonNull(actor); _modifiedList.add(actor); if (_isActive && _modifiedList.size() > SAVE_MAX && _isSaveRequested.compareAndSet(false, true)) { ServiceRef serviceRef = ServiceRef.current(); serviceRef.save(Result.ignore()); } }
@Override public Cancel exec() { ResultStreamExecute<T> resultStream = new ResultStreamExecute<>(Result.ignore()); offer(resultStream); return resultStream; }
@Override public void stop(ShutdownModeAmp mode) throws Exception { super.stop(mode); _schemeBartenderSystem.close(Result.ignore()); }
@Override public void close() throws IOException { if (isClosed()) { return; } closeSchedule(Result.ignore()); }
@Override public void accept(Cancel handle) { try { sendHeartbeats(); } finally { if (_lifecycle.isActive()) { _timer.runAfter(_heartbeatTask, _heartbeatTimeout, TimeUnit.MILLISECONDS, Result.ignore()); } } } }
/** * Stops the current instance. */ protected void restartImpl(Result<I> result) { shutdownImpl(ShutdownModeAmp.GRACEFUL, Result.ignore()); startImpl(result); }
private void onSubscribeFail(Throwable e, long timeout) { log.finer(e.toString()); log.log(Level.FINEST, e.toString(), e); ServicesAmp manager = ServicesAmp.current(); Timers timer = manager.service("timer:///").as(Timers.class); timer.runAfter(h->resubscribe(timeout), timeout, TimeUnit.SECONDS, Result.ignore()); }
public void put(RowCursor cursor) { RowCursor workCursor = _table.cursor(); _leaf.put(_table, _table.getPageActor(), cursor, workCursor, null, PutType.PUT, Result.ignore()); }
public void saveMetaTableUpdate(byte []tableKey, long now) { RowCursor cursor = _metaUpdateTable.cursor(); cursor.setBytes(1, tableKey, 0); cursor.setLong(2, now); _metaUpdateTable.put(cursor, Result.ignore()); }
@OnInit public void init() { timers.runAfter(this::fire, 2, TimeUnit.SECONDS, Result.ignore()); }
@Override public void remove(RowCursor cursor, BackupKelp backup, Result<Boolean> result) { updateVersion(cursor); _journal.remove(cursor); removeImpl(cursor, backup, result); if (_journal.isCheckpointRequired()) { checkpoint(Result.ignore()); } }
void onJoinStart() { _bfsPath.watch(path->updateBfsPath()); ServicesAmp manager = AmpSystem.currentManager(); Timers timer = manager.service("timer://").as(Timers.class); // XXX: check every 60s because watch might be unreliable (cloud/0642) timer.runEvery(x->updateBfsPath(), 60, TimeUnit.SECONDS, Result.ignore()); updateBfsPath(); }