com.alibaba.rocketmq.store.index
类 IndexService
java.lang.Object
com.alibaba.rocketmq.common.ServiceThread
com.alibaba.rocketmq.store.index.IndexService
- 所有已实现的接口:
- Runnable
public class IndexService
- extends ServiceThread
消息索引服务
- 从以下版本开始:
- 2013-7-21
- 作者:
- shijia.wxr
| 从类 com.alibaba.rocketmq.common.ServiceThread 继承的方法 |
getJointime, isStoped, makeStop, onWaitEnd, shutdown, shutdown, start, stop, stop, waitForRunning, wakeup |
| 从类 java.lang.Object 继承的方法 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IndexService
public IndexService(DefaultMessageStore store)
load
public boolean load(boolean lastExitOK)
deleteExpiredFile
public void deleteExpiredFile(long offset)
- 删除索引文件
destroy
public void destroy()
queryOffset
public QueryOffsetResult queryOffset(String topic,
String key,
int maxNum,
long begin,
long end)
putRequest
public void putRequest(Object[] reqs)
- 向队列中添加请求,队列满情况下,丢弃请求
run
public void run()
buildIndex
public void buildIndex(Object[] req)
retryGetAndCreateIndexFile
public IndexFile retryGetAndCreateIndexFile()
getAndCreateLastIndexFile
public IndexFile getAndCreateLastIndexFile()
- 获取最后一个索引文件,如果集合为空或者最后一个文件写满了,则新建一个文件
只有一个线程调用,所以不存在写竟争问题
flush
public void flush(IndexFile f)
getServiceName
public String getServiceName()
- 指定者:
- 类
ServiceThread 中的 getServiceName
Copyright © 2012–2015. All rights reserved.