Ejemplo n.º 1
0
  /**
   * 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);
    }
  }
Ejemplo n.º 2
0
 @Override
 public ImmutableList<E> subList(int fromIndex, int toIndex) {
   Preconditions.checkPositionIndexes(fromIndex, toIndex, 1);
   return (fromIndex == toIndex) ? ImmutableList.<E>of() : this;
 }
Ejemplo n.º 3
0
 @Override
 public E get(int index) {
   Preconditions.checkElementIndex(index, 1);
   return element;
 }
Ejemplo n.º 4
0
 protected SimpleForwardingLoadingCache(LoadingCache<K, V> delegate) {
   this.delegate = Preconditions.checkNotNull(delegate);
 }
Ejemplo n.º 5
0
 public StreamSnapshotSink(Mailbox mb) {
   Preconditions.checkArgument(mb != null);
   m_mb = mb;
 }
Ejemplo n.º 6
0
 /** 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;
 }