Class MemCheckpointStreamFactory.MemoryCheckpointOutputStream

    • Constructor Detail

      • MemoryCheckpointOutputStream

        public MemoryCheckpointOutputStream​(int maxSize)
    • Method Detail

      • flush

        public void flush()
                   throws IOException
        Specified by:
        flush in interface Flushable
        Specified by:
        flush in class org.apache.flink.core.fs.FSDataOutputStream
        Throws:
        IOException
      • sync

        public void sync()
                  throws IOException
        Specified by:
        sync in class org.apache.flink.core.fs.FSDataOutputStream
        Throws:
        IOException
      • close

        public void close()
        Description copied from class: CheckpointStateOutputStream
        This method should close the stream, if has not been closed before. If this method actually closes the stream, it should delete/release the resource behind the stream, such as the file that the stream writes to.

        The above implies that this method is intended to be the "unsuccessful close", such as when cancelling the stream writing, or when an exception occurs. Closing the stream for the successful case must go through CheckpointStateOutputStream.closeAndGetHandle().

        Specified by:
        close in interface AutoCloseable
        Specified by:
        close in interface Closeable
        Specified by:
        close in class CheckpointStateOutputStream
      • getPos

        public long getPos()
                    throws IOException
        Specified by:
        getPos in class org.apache.flink.core.fs.FSDataOutputStream
        Throws:
        IOException
      • isClosed

        public boolean isClosed()
      • closeAndGetBytes

        public byte[] closeAndGetBytes()
                                throws IOException
        Closes the stream and returns the byte array containing the stream's data.
        Returns:
        The byte array containing the stream's data.
        Throws:
        IOException - Thrown if the size of the data exceeds the maximal