Class ChunkLoaderV1

  • All Implemented Interfaces:
    Callable<byte[]>, org.openjdk.jmc.flightrecorder.internal.IChunkLoader

    public class ChunkLoaderV1
    extends Object
    implements org.openjdk.jmc.flightrecorder.internal.IChunkLoader
    • Constructor Detail

      • ChunkLoaderV1

        public ChunkLoaderV1​(org.openjdk.jmc.flightrecorder.internal.parser.v1.ChunkStructure header,
                             byte[] data,
                             LoaderContext context)
    • Method Detail

      • call

        public byte[] call()
                    throws Exception
        Description copied from interface: org.openjdk.jmc.flightrecorder.internal.IChunkLoader
        Perform the chunk loading.
        Specified by:
        call in interface Callable<byte[]>
        Specified by:
        call in interface org.openjdk.jmc.flightrecorder.internal.IChunkLoader
        Returns:
        The byte array that was backing the chunk data. After returning this, the chunk loader is done with the array and it may be reused for a new chunk.
        Throws:
        Exception
      • getTimestamp

        public long getTimestamp()
        Specified by:
        getTimestamp in interface org.openjdk.jmc.flightrecorder.internal.IChunkLoader
        Returns:
        The chunk timestamp. The unit is not specified, it might be milliseconds or nanoseconds since 1970, but the important thing is that it is unique for every chunk in a recording.