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 继承的字段
hasNotified, stoped, thread
 
构造方法摘要
IndexService(DefaultMessageStore store)
           
 
方法摘要
 void buildIndex(Object[] req)
           
 void deleteExpiredFile(long offset)
          删除索引文件
 void destroy()
           
 void flush(IndexFile f)
           
 IndexFile getAndCreateLastIndexFile()
          获取最后一个索引文件,如果集合为空或者最后一个文件写满了,则新建一个文件
只有一个线程调用,所以不存在写竟争问题
 String getServiceName()
           
 boolean load(boolean lastExitOK)
           
 void putRequest(Object[] reqs)
          向队列中添加请求,队列满情况下,丢弃请求
 QueryOffsetResult queryOffset(String topic, String key, int maxNum, long begin, long end)
           
 IndexFile retryGetAndCreateIndexFile()
           
 void run()
           
 
从类 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.