@Test public void testAutoCloseOfWriter() throws InterruptedException, IOException { setupWriter(_configuration); Thread.sleep(TimeUnit.SECONDS.toMillis(5)); for (int i = 0; i < 10; i++) { if (_writer.isWriterClosed()) { return; } Thread.sleep(TimeUnit.SECONDS.toMillis(1)); } fail(); }
protected boolean isWriterClosed() { return _writer.get() == null; }
BlurIndexSimpleWriter extends BlurIndex { protected boolean isWriterClosed() { return _writer.get() == null; } }
BlurIndexSimpleWriter extends BlurIndex { protected boolean isWriterClosed() { return _writer.get() == null; } BlurIndexSimpleWriter(BlurIndexConfig blurIndexConf); }
BlurIndexSimpleWriter extends BlurIndex { protected boolean isWriterClosed() { return _writer.get() == null; } BlurIndexSimpleWriter(BlurIndexConfig blurIndexConf); int getReaderGenerationCount(); @Override IndexSearcherCloseable getIndexSearcher(); IndexSearcherCloseable getIndexSearcher(boolean security); @Override void close(); @Override synchronized void optimize(final int numberOfSegmentsPerShard); @Override void createSnapshot(String name); @Override void removeSnapshot(String name); @Override List<String> getSnapshots(); @Override void process(IndexAction indexAction); Path getSnapshotsDirectoryPath(); @Override void enqueue(List<RowMutation> mutations); synchronized BulkEntry startBulkMutate(String bulkId); @Override void finishBulkMutate(final String bulkId, boolean apply, boolean blockUntilComplete); @Override void addBulkMutate(String bulkId, RowMutation mutation); @Override long getRecordCount(); @Override long getRowCount(); @Override long getIndexMemoryUsage(); @Override long getSegmentCount(); @Override long getSegmentImportPendingCount(); @Override long getSegmentImportInProgressCount(); @Override long getOnDiskSize(); }
BlurIndexSimpleWriter extends BlurIndex { protected boolean isWriterClosed() { return _writer.get() == null; } BlurIndexSimpleWriter(BlurIndexConfig blurIndexConf); int getReaderGenerationCount(); @Override IndexSearcherCloseable getIndexSearcher(); IndexSearcherCloseable getIndexSearcher(boolean security); @Override void close(); @Override synchronized void optimize(final int numberOfSegmentsPerShard); @Override void createSnapshot(String name); @Override void removeSnapshot(String name); @Override List<String> getSnapshots(); @Override void process(IndexAction indexAction); Path getSnapshotsDirectoryPath(); @Override void enqueue(List<RowMutation> mutations); synchronized BulkEntry startBulkMutate(String bulkId); @Override void finishBulkMutate(final String bulkId, boolean apply, boolean blockUntilComplete); @Override void addBulkMutate(String bulkId, RowMutation mutation); @Override long getRecordCount(); @Override long getRowCount(); @Override long getIndexMemoryUsage(); @Override long getSegmentCount(); @Override long getSegmentImportPendingCount(); @Override long getSegmentImportInProgressCount(); @Override long getOnDiskSize();  }