@Test public void testClear() throws Exception { TestUtils.assertMemoryLeak(() -> { CairoTestUtils.createTestTable(10000, new Rnd(), new TestRecord.ArrayBinarySequence()); try (TableReader reader = new TableReader(configuration, "x")) { entityColumnFilter.of(reader.getColumnCount()); RecordSink recordSink = RecordSinkFactory.getInstance(asm, reader.getMetadata(), entityColumnFilter, false); try (RecordChain chain = new RecordChain(reader.getMetadata(), recordSink, SIZE_4M, Integer.MAX_VALUE)) { Assert.assertFalse(chain.hasNext()); populateChain(chain, reader); chain.toTop(); Assert.assertTrue(chain.hasNext()); chain.clear(); chain.toTop(); Assert.assertFalse(chain.hasNext()); } } }); }
@Override public void clear() { close(); }
RecordChain implements Closeable, RecordCursor, Mutable, RecordSinkSPI { @Override public void clear() { close(); } }
RecordChain implements Closeable, RecordCursor, Mutable, RecordSinkSPI { @Override public void clear() { close(); } RecordChain(@Transient ColumnTypes columnTypes, RecordSink recordSink, long pageSize, int maxPages); }
RecordChain implements Closeable, RecordCursor, Mutable, RecordSinkSPI { @Override public void clear() { close(); } RecordChain(@Transient ColumnTypes columnTypes, RecordSink recordSink, long pageSize, int maxPages); long beginRecord(long prevOffset); @Override void clear(); @Override void close(); @Override Record getRecord(); @Override boolean hasNext(); @Override Record getRecordB(); @Override void recordAt(Record record, long row); @Override void toTop(); void of(long nextRecordOffset); long put(Record record, long prevRecordOffset); @Override void putBin(BinarySequence value); @Override void putBool(boolean value); @Override void putByte(byte value); @Override void putDate(long date); @Override void putDouble(double value); @Override void putFloat(float value); @Override void putInt(int value); @Override void putLong(long value); @Override void putLong256(Long256 value); @Override void putShort(short value); @Override void putChar(char value); @Override void putStr(CharSequence value); @Override void putStr(CharSequence value, int lo, int hi); @Override void putTimestamp(long value); void setSymbolTableResolver(RecordCursor resolver); @Override long size(); }
RecordChain implements Closeable, RecordCursor, Mutable, RecordSinkSPI { @Override public void clear() { close(); } RecordChain(@Transient ColumnTypes columnTypes, RecordSink recordSink, long pageSize, int maxPages); long beginRecord(long prevOffset); @Override void clear(); @Override void close(); @Override Record getRecord(); @Override boolean hasNext(); @Override Record getRecordB(); @Override void recordAt(Record record, long row); @Override void toTop(); void of(long nextRecordOffset); long put(Record record, long prevRecordOffset); @Override void putBin(BinarySequence value); @Override void putBool(boolean value); @Override void putByte(byte value); @Override void putDate(long date); @Override void putDouble(double value); @Override void putFloat(float value); @Override void putInt(int value); @Override void putLong(long value); @Override void putLong256(Long256 value); @Override void putShort(short value); @Override void putChar(char value); @Override void putStr(CharSequence value); @Override void putStr(CharSequence value, int lo, int hi); @Override void putTimestamp(long value); void setSymbolTableResolver(RecordCursor resolver); @Override long size();  }