Class ChunkLoaderV1
- java.lang.Object
-
- org.openjdk.jmc.flightrecorder.internal.parser.v1.ChunkLoaderV1
-
- All Implemented Interfaces:
java.util.concurrent.Callable<byte[]>,org.openjdk.jmc.flightrecorder.internal.IChunkLoader
public class ChunkLoaderV1 extends java.lang.Object implements org.openjdk.jmc.flightrecorder.internal.IChunkLoader
-
-
Constructor Summary
Constructors Constructor Description ChunkLoaderV1(org.openjdk.jmc.flightrecorder.internal.parser.v1.ChunkStructure header, byte[] data, LoaderContext context)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]call()Perform the chunk loading.static org.openjdk.jmc.flightrecorder.internal.IChunkLoadercreate(Chunk input, LoaderContext context)static org.openjdk.jmc.flightrecorder.internal.ChunkInfogetInfo(Chunk input, long position)longgetTimestamp()
-
-
-
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 java.lang.ExceptionDescription copied from interface:org.openjdk.jmc.flightrecorder.internal.IChunkLoaderPerform the chunk loading.- Specified by:
callin interfacejava.util.concurrent.Callable<byte[]>- Specified by:
callin interfaceorg.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:
java.lang.Exception
-
create
public static org.openjdk.jmc.flightrecorder.internal.IChunkLoader create(Chunk input, LoaderContext context) throws java.io.IOException, CouldNotLoadRecordingException
- Throws:
java.io.IOExceptionCouldNotLoadRecordingException
-
getInfo
public static org.openjdk.jmc.flightrecorder.internal.ChunkInfo getInfo(Chunk input, long position) throws java.io.IOException, CouldNotLoadRecordingException
- Throws:
java.io.IOExceptionCouldNotLoadRecordingException
-
getTimestamp
public long getTimestamp()
- Specified by:
getTimestampin interfaceorg.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.
-
-