|
||||||||||
上一个类 下一个类 | 框架 无框架 | |||||||||
摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 |
java.lang.Object com.taobao.metamorphosis.client.producer.SimpleMessageProducer com.taobao.metamorphosis.client.producer.SimpleXAMessageProducer
public class SimpleXAMessageProducer
XA消息生产者的实现类
字段摘要 |
---|
从类 com.taobao.metamorphosis.client.producer.SimpleMessageProducer 继承的字段 |
---|
DEFAULT_OP_TIMEOUT, lastSentInfo, partitionSelector, producerZooKeeper, remotingClient, sessionId, transactionContext, transactionRequestTimeoutInMills, transactionTimeout |
从接口 com.taobao.metamorphosis.client.producer.XAMessageProducer 继承的字段 |
---|
DEFAULT_UNIQUE_QUALIFIER_PREFIX |
构造方法摘要 | |
---|---|
SimpleXAMessageProducer(MetaMessageSessionFactory messageSessionFactory,
RemotingClientWrapper remotingClient,
PartitionSelector partitionSelector,
ProducerZooKeeper producerZooKeeper,
String sessionId)
|
方法摘要 | |
---|---|
void |
brokersChanged(String topic)
called when broker list changed. |
static String |
getLocalhostName()
|
String |
getUniqueQualifier()
Returns the unique qualifier for this XA producer.The default is "XAMessageProducer-[hostname]". |
XAResource |
getXAResource()
返回一个XAResource对象。 |
void |
publish(String topic)
发布topic,以便producer从zookeeper获取broker列表并连接,在发送消息前必须先调用此方法 |
void |
setUniqueQualifier(String uniqueQualifier)
Set the unique qualifier for this producer,it must be unique in global and is not changed after be set. |
void |
setUniqueQualifierPrefix(String prefix)
Set unique qualifier prefix for this message producer,Then the unique qualifier will be "[prefix]-[hostname]".The default prefix is "XAMessageProducer",but recommend you to set an unique qualifier prefix for this producer,such as your application name. |
void |
shutdown()
关闭生产者,释放资源 |
从类 com.taobao.metamorphosis.client.producer.SimpleMessageProducer 继承的方法 |
---|
beforeSendMessageFirstTime, beginTransaction, checkMessage, checkState, commit, getParent, getPartitionSelector, getSessionId, getTransactionId, getTransactionTimeout, invokeToGroup, isInTransaction, isOrdered, logLastSentInfo, removeContext, resetLastSentInfo, rollback, sendMessage, sendMessage, sendMessage, sendMessage, sendMessageToServer, setDefaultTopic, setTransactionRequestTimeout, setTransactionTimeout |
从类 java.lang.Object 继承的方法 |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
从接口 com.taobao.metamorphosis.client.producer.MessageProducer 继承的方法 |
---|
beginTransaction, commit, getPartitionSelector, getTransactionTimeout, isOrdered, rollback, sendMessage, sendMessage, sendMessage, sendMessage, setDefaultTopic, setTransactionRequestTimeout, setTransactionTimeout |
构造方法详细信息 |
---|
public SimpleXAMessageProducer(MetaMessageSessionFactory messageSessionFactory, RemotingClientWrapper remotingClient, PartitionSelector partitionSelector, ProducerZooKeeper producerZooKeeper, String sessionId)
方法详细信息 |
---|
public static String getLocalhostName()
public void publish(String topic)
MessageProducer
复制的描述
MessageProducer
中的 publish
SimpleMessageProducer
中的 publish
public void brokersChanged(String topic)
ProducerZooKeeper.BrokerChangeListener
复制的描述
ProducerZooKeeper.BrokerChangeListener
中的 brokersChanged
public String getUniqueQualifier()
XAMessageProducer
复制的描述
XAMessageProducer
中的 getUniqueQualifier
public void setUniqueQualifier(String uniqueQualifier)
XAMessageProducer
复制的描述
XAMessageProducer
中的 setUniqueQualifier
public void setUniqueQualifierPrefix(String prefix)
XAMessageProducer
复制的描述
XAMessageProducer
中的 setUniqueQualifierPrefix
prefix
- Prefix string for unique qualifier,it will be added in front
of hostname.public XAResource getXAResource() throws MetaClientException
XAMessageProducer
复制的描述
XAMessageProducer
中的 getXAResource
MetaClientException
public void shutdown() throws MetaClientException
MessageProducer
复制的描述
MessageProducer
中的 shutdown
Shutdownable
中的 shutdown
SimpleMessageProducer
中的 shutdown
MetaClientException
|
||||||||||
上一个类 下一个类 | 框架 无框架 | |||||||||
摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 |