private void writeIfBlockFull() throws IOException { if (bufferInUse() >= syncInterval) writeBlock(); }
private void writeIfBlockFull() throws IOException { if (bufferInUse() >= syncInterval) writeBlock(); }
/** Return the current position as a value that may be passed to {@link * DataFileReader#seek(long)}. Forces the end of the current block, * emitting a synchronization marker. By default, this will also flush the * block to the stream. * * If {@linkplain #setFlushOnEveryBlock(boolean)} is * called with param set to false, then this method may not flush * the block. In this case, the {@linkplain #flush()} must be called to * flush the stream. */ public long sync() throws IOException { assertOpen(); writeBlock(); return out.tell(); }
/** Return the current position as a value that may be passed to {@link * DataFileReader#seek(long)}. Forces the end of the current block, * emitting a synchronization marker. By default, this will also flush the * block to the stream. * * If {@linkplain #setFlushOnEveryBlock(boolean)} is * called with param set to false, then this method may not flush * the block. In this case, the {@linkplain #flush()} must be called to * flush the stream. */ public long sync() throws IOException { assertOpen(); writeBlock(); return out.tell(); }
writeBlock(); Codec otherCodec = otherFile.resolveCodec(); DataBlock nextBlockRaw = null;
writeBlock(); Codec otherCodec = otherFile.resolveCodec(); DataBlock nextBlockRaw = null;
private void writeIfBlockFull() throws IOException { if (bufferInUse() >= syncInterval) writeBlock(); }
private void writeIfBlockFull() throws IOException { if (bufferInUse() >= syncInterval) writeBlock(); }
/** Append a datum to the file. */ public void append(D datum) throws IOException { assertOpen(); dout.write(datum, bufOut); blockCount++; if (buffer.size() >= syncInterval) writeBlock(); }
/** Append a datum to the file. */ public void append(D datum) throws IOException { assertOpen(); dout.write(datum, bufOut); blockCount++; if (buffer.size() >= syncInterval) writeBlock(); }
/** Expert: Append a pre-encoded datum to the file. No validation is * performed to check that the encoding conforms to the file's schema. * Appending non-conforming data may result in an unreadable file. */ public void appendEncoded(ByteBuffer datum) throws IOException { assertOpen(); int start = datum.position(); buffer.write(datum.array(), start, datum.limit()-start); blockCount++; if (buffer.size() >= syncInterval) writeBlock(); }
/** Return the current position as a value that may be passed to {@link * DataFileReader#seek(long)}. Forces the end of the current block, * emitting a synchronization marker. */ public long sync() throws IOException { assertOpen(); writeBlock(); return out.tell(); }
/** Return the current position as a value that may be passed to {@link * DataFileReader#seek(long)}. Forces the end of the current block, * emitting a synchronization marker. */ public long sync() throws IOException { assertOpen(); writeBlock(); return out.tell(); }
/** Return the current position as a value that may be passed to {@link * DataFileReader#seek(long)}. Forces the end of the current block, * emitting a synchronization marker. */ public long sync() throws IOException { assertOpen(); writeBlock(); return out.tell(); }
/** Return the current position as a value that may be passed to {@link * DataFileReader#seek(long)}. Forces the end of the current block, * emitting a synchronization marker. By default, this will also flush the * block to the stream. * * If {@linkplain #setFlushOnEveryBlock(boolean)} is * called with param set to false, then this method may not flush * the block. In this case, the {@linkplain #flush()} must be called to * flush the stream. */ public long sync() throws IOException { assertOpen(); writeBlock(); return out.tell(); }
writeBlock(); Codec otherCodec = otherFile.resolveCodec(); DataBlock nextBlockRaw = null;
writeBlock(); Codec otherCodec = otherFile.resolveCodec(); DataBlock nextBlockRaw = null;
writeBlock(); Codec otherCodec = otherFile.resolveCodec(); DataBlock nextBlockRaw = null;
writeBlock(); Codec otherCodec = otherFile.resolveCodec(); DataBlock nextBlockRaw = null;