/** * Flush if there is unflushed data that was written to the CommitLog before @param flushIfDirtyBefore * (inclusive). * * @return a Future yielding the commit log position that can be guaranteed to have been successfully written * to sstables for this table once the future completes */ public ListenableFuture<?> forceFlush(CommitLogPosition flushIfDirtyBefore) { // we don't loop through the remaining memtables since here we only care about commit log dirtiness // and this does not vary between a table and its table-backed indexes Memtable current = data.getView().getCurrentMemtable(); if (current.mayContainDataBefore(flushIfDirtyBefore)) return switchMemtableIfCurrent(current); return waitForFlushes(); }
/** * Flush if there is unflushed data that was written to the CommitLog before @param flushIfDirtyBefore * (inclusive). * * @return a Future yielding the commit log position that can be guaranteed to have been successfully written * to sstables for this table once the future completes */ public ListenableFuture<?> forceFlush(CommitLogPosition flushIfDirtyBefore) { // we don't loop through the remaining memtables since here we only care about commit log dirtiness // and this does not vary between a table and its table-backed indexes Memtable current = data.getView().getCurrentMemtable(); if (current.mayContainDataBefore(flushIfDirtyBefore)) return switchMemtableIfCurrent(current); return waitForFlushes(); }
/** * Flush if there is unflushed data that was written to the CommitLog before @param flushIfDirtyBefore * (inclusive). * * @return a Future yielding the commit log position that can be guaranteed to have been successfully written * to sstables for this table once the future completes */ public ListenableFuture<?> forceFlush(CommitLogPosition flushIfDirtyBefore) { // we don't loop through the remaining memtables since here we only care about commit log dirtiness // and this does not vary between a table and its table-backed indexes Memtable current = data.getView().getCurrentMemtable(); if (current.mayContainDataBefore(flushIfDirtyBefore)) return switchMemtableIfCurrent(current); return waitForFlushes(); }