Class StreamSession<T extends TransportContext>

    • Method Detail

      • onSSTablesProduced

        protected abstract void onSSTablesProduced​(java.util.Set<org.apache.cassandra.bridge.SSTableDescriptor> sstables)
        Get notified on sstables produced. When the method is invoked, the input parameter 'sstables' is guaranteed to be non-empty.
        Parameters:
        sstables - produces SSTables
      • doFinalizeStream

        protected abstract StreamResult doFinalizeStream()
        Finalize the stream with the produced sstables and return the stream result.
        Returns:
        stream result
      • sendRemainingSSTables

        protected abstract void sendRemainingSSTables()
        Send the SSTable(s) written by SSTableWriter The code runs on a separate thread
      • getTokenRange

        public com.google.common.collect.Range<java.math.BigInteger> getTokenRange()
      • throwIfLastStreamFailed

        public void throwIfLastStreamFailed()
                                     throws java.io.IOException
        Throw exception when the last streaming task has failed
        Throws:
        java.io.IOException - stream failure
      • addRow

        public void addRow​(java.math.BigInteger token,
                           java.util.Map<java.lang.String,​java.lang.Object> boundValues)
                    throws java.io.IOException
        Throws:
        java.io.IOException
      • rowCount

        public long rowCount()
      • finalizeStreamAsync

        public java.util.concurrent.Future<StreamResult> finalizeStreamAsync()
                                                                      throws java.io.IOException
        Throws:
        java.io.IOException
      • isStreamFinalized

        protected boolean isStreamFinalized()
      • setLastStreamFailure

        protected boolean setLastStreamFailure​(java.lang.Exception streamFailure)
      • recordStreamedFile

        protected void recordStreamedFile​(java.nio.file.Path file)
      • isFileStreamed

        protected boolean isFileStreamed​(java.nio.file.Path file)
      • cleanupSSTables

        protected void cleanupSSTables​(org.slf4j.Logger logger)