public class DataIndex extends Object
dbRandFile.write(QueueConstant.MAGIC.getBytes());0 dbRandFile.writeInt(QueueConstant.VERSION); 8 dbRandFile.writeInt(readerIndex); 12 dbRandFile.writeInt(writerIndex); 16 dbRandFile.writeLong(0); 20
| 限定符和类型 | 字段和说明 |
|---|---|
static int |
INDEX_LIMIT_LENGTH |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close()
关闭索引文件
|
void |
decrementSize() |
long |
getSize() |
void |
incrementSize() |
void |
putReaderIndex(int index)
记录读取文件索引
|
void |
putWriterIndex(int index)
记录写文件索引
|
public static final int INDEX_LIMIT_LENGTH
public DataIndex(String path) throws IOException, FileFormatException
Copyright © 2021. All rights reserved.