metaBuffer.writeInt(bodyOffset); //TODO - reconsider how frequently this shortcut is placed on disk
metaBuffer.writeInt(out.snapshotLength);
bodyOffset += out.snapshotLength;
}
while (metaBuffer.readableBytes() > 0) {
metaBuffer.readBytes(openWriteFile, metaBuffer.readableBytes());
}
metaBuffer.release();
/* write bytes for each stream id */
for (TempData out : streamsWithData) {
synchronized (out.stream) { // need less confusing variable names for concurrency