美文网首页
store模块阅读13:Index子模块2:QueryOffse

store模块阅读13:Index子模块2:QueryOffse

作者: 赤子心_d709 | 来源:发表于2017-10-26 19:53 被阅读21次

说明

这个类就是用来记录IndexFile中selectPhyOffset的结果的,进行了一层封装

源码

public class QueryOffsetResult {
    private final List<Long> phyOffsets;//搜索结果,Long存的是消息的物理偏移
    private final long indexLastUpdateTimestamp;//当时最后一个IndexFile的EndTimestamp
    private final long indexLastUpdatePhyoffset;//当时最后一个IndexFile的EndPhyOffset
    public QueryOffsetResult(List<Long> phyOffsets, long indexLastUpdateTimestamp,
        long indexLastUpdatePhyoffset) {
        this.phyOffsets = phyOffsets;
        this.indexLastUpdateTimestamp = indexLastUpdateTimestamp;
        this.indexLastUpdatePhyoffset = indexLastUpdatePhyoffset;
    }

    public List<Long> getPhyOffsets() {
        return phyOffsets;
    }

    public long getIndexLastUpdateTimestamp() {
        return indexLastUpdateTimestamp;
    }

    public long getIndexLastUpdatePhyoffset() {
        return indexLastUpdatePhyoffset;
    }
}

问题

暂时不知道为什么要indexLastUpdateTimestamp以及indexLastUpdatePhyoffset属性

看上层也是一层层封装这个东西,但是并没有get的调用,见
QueryMessageResponseHeader#getIndexLastUpdatePhyoffset

相关文章

网友评论

      本文标题:store模块阅读13:Index子模块2:QueryOffse

      本文链接:https://www.haomeiwen.com/subject/wntlpxtx.html