com.taobao.metamorphosis.server.assembly
类 BrokerCommandProcessor
java.lang.Object
com.taobao.metamorphosis.server.assembly.BrokerCommandProcessor
- 所有已实现的接口:
- CommandProcessor, Service
- 直接已知子类:
- GregorCommandProcessor, SamsaCommandProcessor
public class BrokerCommandProcessor
- extends Object
- implements CommandProcessor
meta服务端核心处理器
- 作者:
- boyan
方法摘要 |
void |
beginTransaction(SessionContext context,
TransactionId xid,
int seconds)
|
void |
commitTransaction(SessionContext context,
TransactionId xid,
boolean onePhase)
|
void |
dispose()
|
void |
forgetTransaction(SessionContext context,
TransactionId xid)
|
protected String |
genErrorMessage(String topic,
int partition)
|
protected String |
genPutResultString(int partition,
long messageId,
long offset)
返回形如"messageId partition offset"的字符号,返回给客户端 |
BrokerZooKeeper |
getBrokerZooKeeper()
|
ConsumerFilterManager |
getConsumerFilterManager()
|
ExecutorsManager |
getExecutorsManager()
|
IdWorker |
getIdWorker()
|
MetaConfig |
getMetaConfig()
|
protected int |
getPartition(PutCommand request)
|
TransactionId[] |
getPreparedTransactions(SessionContext context,
String uniqueQualifier)
|
com.taobao.gecko.service.RemotingServer |
getRemotingServer()
|
StatsManager |
getStatsManager()
|
MessageStoreManager |
getStoreManager()
|
Transaction |
getTransaction(SessionContext context,
TransactionId xid)
|
void |
init()
|
int |
prepareTransaction(SessionContext context,
TransactionId xid)
|
com.taobao.gecko.core.command.ResponseCommand |
processGetCommand(GetCommand request,
SessionContext ctx)
|
com.taobao.gecko.core.command.ResponseCommand |
processGetCommand(GetCommand request,
SessionContext ctx,
boolean zeroCopy)
Under conditions that cannot use notify-remoting directly. |
com.taobao.gecko.core.command.ResponseCommand |
processOffsetCommand(OffsetCommand request,
SessionContext ctx)
|
void |
processPutCommand(PutCommand request,
SessionContext sessionContext,
PutCallback cb)
|
void |
processQuitCommand(QuitCommand request,
SessionContext ctx)
|
com.taobao.gecko.core.command.ResponseCommand |
processStatCommand(StatsCommand request,
SessionContext ctx)
|
com.taobao.gecko.core.command.ResponseCommand |
processVesionCommand(VersionCommand request,
SessionContext ctx)
|
void |
removeTransaction(XATransactionId xid)
|
void |
rollbackTransaction(SessionContext context,
TransactionId xid)
|
void |
setBrokerZooKeeper(BrokerZooKeeper brokerZooKeeper)
|
void |
setConsumerFilterManager(ConsumerFilterManager consumerFilterManager)
|
void |
setExecutorsManager(ExecutorsManager executorsManager)
|
void |
setIdWorker(IdWorker idWorker)
|
void |
setMetaConfig(MetaConfig metaConfig)
|
void |
setRemotingServer(com.taobao.gecko.service.RemotingServer remotingServer)
|
void |
setStatsManager(StatsManager statsManager)
|
void |
setStoreManager(MessageStoreManager storeManager)
|
从类 java.lang.Object 继承的方法 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
storeManager
protected MessageStoreManager storeManager
executorsManager
protected ExecutorsManager executorsManager
statsManager
protected StatsManager statsManager
remotingServer
protected com.taobao.gecko.service.RemotingServer remotingServer
metaConfig
protected MetaConfig metaConfig
idWorker
protected IdWorker idWorker
brokerZooKeeper
protected BrokerZooKeeper brokerZooKeeper
consumerFilterManager
protected ConsumerFilterManager consumerFilterManager
BrokerCommandProcessor
public BrokerCommandProcessor()
- 仅用于测试
BrokerCommandProcessor
public BrokerCommandProcessor(MessageStoreManager storeManager,
ExecutorsManager executorsManager,
StatsManager statsManager,
com.taobao.gecko.service.RemotingServer remotingServer,
MetaConfig metaConfig,
IdWorker idWorker,
BrokerZooKeeper brokerZooKeeper,
ConsumerFilterManager consumerFilterManager)
genErrorMessage
protected String genErrorMessage(String topic,
int partition)
getConsumerFilterManager
public ConsumerFilterManager getConsumerFilterManager()
setConsumerFilterManager
public void setConsumerFilterManager(ConsumerFilterManager consumerFilterManager)
getStoreManager
public MessageStoreManager getStoreManager()
setStoreManager
public void setStoreManager(MessageStoreManager storeManager)
getExecutorsManager
public ExecutorsManager getExecutorsManager()
setExecutorsManager
public void setExecutorsManager(ExecutorsManager executorsManager)
getStatsManager
public StatsManager getStatsManager()
setStatsManager
public void setStatsManager(StatsManager statsManager)
getRemotingServer
public com.taobao.gecko.service.RemotingServer getRemotingServer()
setRemotingServer
public void setRemotingServer(com.taobao.gecko.service.RemotingServer remotingServer)
getMetaConfig
public MetaConfig getMetaConfig()
setMetaConfig
public void setMetaConfig(MetaConfig metaConfig)
getIdWorker
public IdWorker getIdWorker()
setIdWorker
public void setIdWorker(IdWorker idWorker)
getBrokerZooKeeper
public BrokerZooKeeper getBrokerZooKeeper()
setBrokerZooKeeper
public void setBrokerZooKeeper(BrokerZooKeeper brokerZooKeeper)
init
public void init()
- 指定者:
- 接口
Service
中的 init
dispose
public void dispose()
- 指定者:
- 接口
Service
中的 dispose
processPutCommand
public void processPutCommand(PutCommand request,
SessionContext sessionContext,
PutCallback cb)
- 指定者:
- 接口
CommandProcessor
中的 processPutCommand
getPartition
protected int getPartition(PutCommand request)
genPutResultString
protected String genPutResultString(int partition,
long messageId,
long offset)
- 返回形如"messageId partition offset"的字符号,返回给客户端
- 参数:
partition
- messageId
- offset
-
- 返回:
processGetCommand
public com.taobao.gecko.core.command.ResponseCommand processGetCommand(GetCommand request,
SessionContext ctx)
- 指定者:
- 接口
CommandProcessor
中的 processGetCommand
processGetCommand
public com.taobao.gecko.core.command.ResponseCommand processGetCommand(GetCommand request,
SessionContext ctx,
boolean zeroCopy)
- 从接口
CommandProcessor
复制的描述
- Under conditions that cannot use notify-remoting directly.
- 指定者:
- 接口
CommandProcessor
中的 processGetCommand
processOffsetCommand
public com.taobao.gecko.core.command.ResponseCommand processOffsetCommand(OffsetCommand request,
SessionContext ctx)
- 指定者:
- 接口
CommandProcessor
中的 processOffsetCommand
processQuitCommand
public void processQuitCommand(QuitCommand request,
SessionContext ctx)
- 指定者:
- 接口
CommandProcessor
中的 processQuitCommand
processVesionCommand
public com.taobao.gecko.core.command.ResponseCommand processVesionCommand(VersionCommand request,
SessionContext ctx)
- 指定者:
- 接口
CommandProcessor
中的 processVesionCommand
processStatCommand
public com.taobao.gecko.core.command.ResponseCommand processStatCommand(StatsCommand request,
SessionContext ctx)
- 指定者:
- 接口
CommandProcessor
中的 processStatCommand
removeTransaction
public void removeTransaction(XATransactionId xid)
- 指定者:
- 接口
CommandProcessor
中的 removeTransaction
getTransaction
public Transaction getTransaction(SessionContext context,
TransactionId xid)
throws MetamorphosisException,
XAException
- 指定者:
- 接口
CommandProcessor
中的 getTransaction
- 抛出:
MetamorphosisException
XAException
forgetTransaction
public void forgetTransaction(SessionContext context,
TransactionId xid)
throws Exception
- 指定者:
- 接口
CommandProcessor
中的 forgetTransaction
- 抛出:
Exception
rollbackTransaction
public void rollbackTransaction(SessionContext context,
TransactionId xid)
throws Exception
- 指定者:
- 接口
CommandProcessor
中的 rollbackTransaction
- 抛出:
Exception
commitTransaction
public void commitTransaction(SessionContext context,
TransactionId xid,
boolean onePhase)
throws Exception
- 指定者:
- 接口
CommandProcessor
中的 commitTransaction
- 抛出:
Exception
prepareTransaction
public int prepareTransaction(SessionContext context,
TransactionId xid)
throws Exception
- 指定者:
- 接口
CommandProcessor
中的 prepareTransaction
- 抛出:
Exception
beginTransaction
public void beginTransaction(SessionContext context,
TransactionId xid,
int seconds)
throws Exception
- 指定者:
- 接口
CommandProcessor
中的 beginTransaction
- 抛出:
Exception
getPreparedTransactions
public TransactionId[] getPreparedTransactions(SessionContext context,
String uniqueQualifier)
throws Exception
- 指定者:
- 接口
CommandProcessor
中的 getPreparedTransactions
- 抛出:
Exception
Copyright © 2010–2013. All rights reserved.