Package org.apache.iotdb.db.wal.buffer
Interface IWALBuffer
-
- All Superinterfaces:
java.lang.AutoCloseable
- All Known Implementing Classes:
AbstractWALBuffer,WALBuffer
public interface IWALBuffer extends java.lang.AutoCloseableThis class serializes and flushesWALEntry. If search is enabled, the order of search index should be protected by the upper layer, and the value should start from 1.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()longgetCurrentSearchIndex()Get current search indexlonggetCurrentWALFileSize()Get current wal file's sizelonggetCurrentWALFileVersion()Get current log version idbooleanisAllWALEntriesConsumed()voidwaitForFlush()Wait for next flush operation donebooleanwaitForFlush(long time, java.util.concurrent.TimeUnit unit)Wait for next flush operation donevoidwrite(WALEntry walEntry)Write WALEntry into wal buffer.
-
-
-
Method Detail
-
write
void write(WALEntry walEntry)
Write WALEntry into wal buffer.- Parameters:
walEntry- info will be written into wal buffer
-
getCurrentWALFileVersion
long getCurrentWALFileVersion()
Get current log version id
-
getCurrentWALFileSize
long getCurrentWALFileSize()
Get current wal file's size
-
getCurrentSearchIndex
long getCurrentSearchIndex()
Get current search index
-
close
void close()
- Specified by:
closein interfacejava.lang.AutoCloseable
-
waitForFlush
void waitForFlush() throws java.lang.InterruptedExceptionWait for next flush operation done- Throws:
java.lang.InterruptedException
-
waitForFlush
boolean waitForFlush(long time, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedExceptionWait for next flush operation done- Throws:
java.lang.InterruptedException
-
isAllWALEntriesConsumed
boolean isAllWALEntriesConsumed()
-
-