com.taobao.metamorphosis.client.producer
接口 XAMessageProducer

所有超级接口:
MessageProducer, Shutdownable
所有已知实现类:
SimpleXAMessageProducer

public interface XAMessageProducer
extends MessageProducer

支持XA事务的消息生产者

作者:
boyan

字段摘要
static String DEFAULT_UNIQUE_QUALIFIER_PREFIX
           
 
方法摘要
 String getUniqueQualifier()
          Returns the unique qualifier for this XA producer.The default is "XAMessageProducer-[hostname]".
 XAResource getXAResource()
          返回一个XAResource对象。
 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.
 
从接口 com.taobao.metamorphosis.client.producer.MessageProducer 继承的方法
beginTransaction, commit, getPartitionSelector, getTransactionTimeout, isOrdered, publish, rollback, sendMessage, sendMessage, sendMessage, sendMessage, setDefaultTopic, setTransactionRequestTimeout, setTransactionTimeout, shutdown
 

字段详细信息

DEFAULT_UNIQUE_QUALIFIER_PREFIX

static final String DEFAULT_UNIQUE_QUALIFIER_PREFIX
另请参见:
常量字段值
方法详细信息

getXAResource

XAResource getXAResource()
                         throws MetaClientException
返回一个XAResource对象。事务管理器将使用该对象来管理XAMessageProducer参与到一个分布式事务中。

返回:
抛出:
MetaClientException

getUniqueQualifier

String getUniqueQualifier()
Returns the unique qualifier for this XA producer.The default is "XAMessageProducer-[hostname]".

返回:

setUniqueQualifier

void setUniqueQualifier(String uniqueQualifier)
Set the unique qualifier for this producer,it must be unique in global and is not changed after be set.


setUniqueQualifierPrefix

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.

参数:
prefix - Prefix string for unique qualifier,it will be added in front of hostname.


Copyright © 2010–2013. All rights reserved.