接口 com.taobao.metamorphosis.server.network.SessionContext
的使用

使用 SessionContext 的软件包
com.taobao.metamorphosis.gregor.master   
com.taobao.metamorphosis.gregor.slave   
com.taobao.metamorphosis.server   
com.taobao.metamorphosis.server.assembly   
com.taobao.metamorphosis.server.network   
com.taobao.metamorphosis.server.store   
com.taobao.metamorphosis.server.transaction   
 

com.taobao.metamorphosis.gregor.masterSessionContext 的使用
 

参数类型为 SessionContextcom.taobao.metamorphosis.gregor.master 中的方法
 void SamsaCommandProcessor.processPutCommand(PutCommand request, SessionContext sessionContext, PutCallback cb)
          处理put请求,只有当master/slave全部写入成功的时候才认为写入成功
 

com.taobao.metamorphosis.gregor.slaveSessionContext 的使用
 

参数类型为 SessionContextcom.taobao.metamorphosis.gregor.slave 中的方法
 void SyncCommandProcessor.processSyncCommand(SyncCommand request, SessionContext sessionContext, PutCallback cb)
          处理同步命令
 void GregorCommandProcessor.processSyncCommand(SyncCommand request, SessionContext sessionContext, PutCallback cb)
           
 

com.taobao.metamorphosis.serverSessionContext 的使用
 

参数类型为 SessionContextcom.taobao.metamorphosis.server 中的方法
 void CommandProcessorFilter.beginTransaction(SessionContext context, TransactionId xid, int seconds)
           
 void CommandProcessor.beginTransaction(SessionContext context, TransactionId xid, int seconds)
           
 void CommandProcessorFilter.commitTransaction(SessionContext context, TransactionId xid, boolean onePhase)
           
 void CommandProcessor.commitTransaction(SessionContext context, TransactionId xid, boolean onePhase)
           
 void CommandProcessorFilter.forgetTransaction(SessionContext context, TransactionId xid)
           
 void CommandProcessor.forgetTransaction(SessionContext context, TransactionId xid)
           
 TransactionId[] CommandProcessorFilter.getPreparedTransactions(SessionContext context, String uniqueQualifier)
           
 TransactionId[] CommandProcessor.getPreparedTransactions(SessionContext context, String uniqueQualifier)
           
 Transaction CommandProcessorFilter.getTransaction(SessionContext context, TransactionId xid)
           
 Transaction CommandProcessor.getTransaction(SessionContext context, TransactionId xid)
           
 int CommandProcessorFilter.prepareTransaction(SessionContext context, TransactionId xid)
           
 int CommandProcessor.prepareTransaction(SessionContext context, TransactionId xid)
           
 com.taobao.gecko.core.command.ResponseCommand CommandProcessorFilter.processGetCommand(GetCommand request, SessionContext ctx)
           
 com.taobao.gecko.core.command.ResponseCommand CommandProcessor.processGetCommand(GetCommand request, SessionContext ctx)
           
 com.taobao.gecko.core.command.ResponseCommand CommandProcessorFilter.processGetCommand(GetCommand request, SessionContext ctx, boolean zeroCopy)
           
 com.taobao.gecko.core.command.ResponseCommand CommandProcessor.processGetCommand(GetCommand request, SessionContext ctx, boolean zeroCopy)
          Under conditions that cannot use notify-remoting directly.
 com.taobao.gecko.core.command.ResponseCommand CommandProcessorFilter.processOffsetCommand(OffsetCommand request, SessionContext ctx)
           
 com.taobao.gecko.core.command.ResponseCommand CommandProcessor.processOffsetCommand(OffsetCommand request, SessionContext ctx)
           
 void CommandProcessorFilter.processPutCommand(PutCommand request, SessionContext sessionContext, PutCallback cb)
           
 void CommandProcessor.processPutCommand(PutCommand request, SessionContext sessionContext, PutCallback cb)
           
 void CommandProcessorFilter.processQuitCommand(QuitCommand request, SessionContext ctx)
           
 void CommandProcessor.processQuitCommand(QuitCommand request, SessionContext ctx)
           
 com.taobao.gecko.core.command.ResponseCommand CommandProcessorFilter.processStatCommand(StatsCommand request, SessionContext ctx)
           
 com.taobao.gecko.core.command.ResponseCommand CommandProcessor.processStatCommand(StatsCommand request, SessionContext ctx)
           
 com.taobao.gecko.core.command.ResponseCommand CommandProcessorFilter.processVesionCommand(VersionCommand request, SessionContext ctx)
           
 com.taobao.gecko.core.command.ResponseCommand CommandProcessor.processVesionCommand(VersionCommand request, SessionContext ctx)
           
 void CommandProcessorFilter.rollbackTransaction(SessionContext context, TransactionId xid)
           
 void CommandProcessor.rollbackTransaction(SessionContext context, TransactionId xid)
           
 

com.taobao.metamorphosis.server.assemblySessionContext 的使用
 

参数类型为 SessionContextcom.taobao.metamorphosis.server.assembly 中的方法
 void TransactionalCommandProcessor.beginTransaction(SessionContext context, TransactionId xid, int seconds)
           
 void BrokerCommandProcessor.beginTransaction(SessionContext context, TransactionId xid, int seconds)
           
 void TransactionalCommandProcessor.commitTransaction(SessionContext context, TransactionId xid, boolean onePhase)
           
 void BrokerCommandProcessor.commitTransaction(SessionContext context, TransactionId xid, boolean onePhase)
           
 void TransactionalCommandProcessor.forgetTransaction(SessionContext context, TransactionId xid)
           
 void BrokerCommandProcessor.forgetTransaction(SessionContext context, TransactionId xid)
           
 TransactionId[] TransactionalCommandProcessor.getPreparedTransactions(SessionContext context, String uniqueQualifier)
           
 TransactionId[] BrokerCommandProcessor.getPreparedTransactions(SessionContext context, String uniqueQualifier)
           
 Transaction TransactionalCommandProcessor.getTransaction(SessionContext context, TransactionId xid)
           
 Transaction BrokerCommandProcessor.getTransaction(SessionContext context, TransactionId xid)
           
 int TransactionalCommandProcessor.prepareTransaction(SessionContext context, TransactionId xid)
           
 int BrokerCommandProcessor.prepareTransaction(SessionContext context, TransactionId xid)
           
 com.taobao.gecko.core.command.ResponseCommand BrokerCommandProcessor.processGetCommand(GetCommand request, SessionContext ctx)
           
 com.taobao.gecko.core.command.ResponseCommand BrokerCommandProcessor.processGetCommand(GetCommand request, SessionContext ctx, boolean zeroCopy)
           
 com.taobao.gecko.core.command.ResponseCommand BrokerCommandProcessor.processOffsetCommand(OffsetCommand request, SessionContext ctx)
           
 void TransactionalCommandProcessor.processPutCommand(PutCommand cmd, SessionContext context, PutCallback cb)
           
 void BrokerCommandProcessor.processPutCommand(PutCommand request, SessionContext sessionContext, PutCallback cb)
           
 void BrokerCommandProcessor.processQuitCommand(QuitCommand request, SessionContext ctx)
           
 com.taobao.gecko.core.command.ResponseCommand BrokerCommandProcessor.processStatCommand(StatsCommand request, SessionContext ctx)
           
 com.taobao.gecko.core.command.ResponseCommand BrokerCommandProcessor.processVesionCommand(VersionCommand request, SessionContext ctx)
           
 void TransactionalCommandProcessor.rollbackTransaction(SessionContext context, TransactionId xid)
           
 void BrokerCommandProcessor.rollbackTransaction(SessionContext context, TransactionId xid)
           
 

com.taobao.metamorphosis.server.networkSessionContext 的使用
 

实现 SessionContextcom.taobao.metamorphosis.server.network 中的类
 class SessionContextImpl
          会话上下文
 

返回 SessionContextcom.taobao.metamorphosis.server.network 中的方法
static SessionContext SessionContextHolder.getOrCreateSessionContext(com.taobao.gecko.service.Connection conn, TransactionId xid)
           
 

com.taobao.metamorphosis.server.storeSessionContext 的使用
 

参数类型为 SessionContextcom.taobao.metamorphosis.server.store 中的方法
 void MessageSet.write(GetCommand getCommand, SessionContext ctx)
           
 void FileMessageSet.write(GetCommand getCommand, SessionContext ctx)
           
 

com.taobao.metamorphosis.server.transactionSessionContext 的使用
 

参数类型为 SessionContextcom.taobao.metamorphosis.server.transaction 中的构造方法
LocalTransaction(TransactionStore transactionStore, LocalTransactionId xid, SessionContext context)
           
 



Copyright © 2010–2013. All rights reserved.