/** * An implementation of run() that does not block the site thread. The Site has responsibility for * transactions that occur between schedulings of this task. */ @Override public void runForRejoin(SiteProcedureConnection siteConnection, TaskLog m_taskLog) throws IOException { RestoreWork rejoinWork = m_rejoinSiteProcessor.poll(m_snapshotBufferAllocator); if (rejoinWork != null) { restoreBlock(rejoinWork, siteConnection); } if (m_rejoinSiteProcessor.isEOF() == false) { m_taskQueue.offer(this); } else { REJOINLOG.debug(m_whoami + "Rejoin snapshot transfer is finished"); m_rejoinSiteProcessor.close(); Preconditions.checkNotNull(m_streamSnapshotMb); VoltDB.instance().getHostMessenger().removeMailbox(m_streamSnapshotMb.getHSId()); doFinishingTask(siteConnection); } }
@Override public ImmutableList<E> subList(int fromIndex, int toIndex) { Preconditions.checkPositionIndexes(fromIndex, toIndex, 1); return (fromIndex == toIndex) ? ImmutableList.<E>of() : this; }
@Override public E get(int index) { Preconditions.checkElementIndex(index, 1); return element; }
protected SimpleForwardingLoadingCache(LoadingCache<K, V> delegate) { this.delegate = Preconditions.checkNotNull(delegate); }
public StreamSnapshotSink(Mailbox mb) { Preconditions.checkArgument(mb != null); m_mb = mb; }
/** Creates a new instance that will read lines from the given {@code Readable} object. */ public LineReader(Readable readable) { Preconditions.checkNotNull(readable); this.readable = readable; this.reader = (readable instanceof Reader) ? (Reader) readable : null; }