Skip to content

Commit

Permalink
javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
ujued committed Jan 14, 2019
1 parent d0fc3a5 commit 3f7e9fd
Show file tree
Hide file tree
Showing 16 changed files with 63 additions and 63 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
*/
@Component
@Slf4j
public class TCCTransactionCleanService implements TransactionCleanService {
public class TccTransactionCleanService implements TransactionCleanService {

@Autowired
private TransactionAttachmentCache transactionAttachmentCache;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@

/**
* @author 侯存路
* @date 2018/12/4
* @company codingApi
* @description
*/
@Configuration
public class RedisConfig {
Expand All @@ -41,7 +38,7 @@ public class RedisConfig {
/**
* 实例化 RedisTemplate 对象
*
* @return
* @return RedisTemplate
*/
@Bean
public RedisTemplate<String, Object> functionDomainRedisTemplate() {
Expand All @@ -53,8 +50,8 @@ public RedisTemplate<String, Object> functionDomainRedisTemplate() {
/**
* 设置数据存入 redis 的序列化方式
*
* @param redisTemplate
* @param factory
* @param redisTemplate redisTemplate
* @param factory factory
*/
private void initDomainRedisTemplate(
RedisTemplate<String, Object> redisTemplate, RedisConnectionFactory factory) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public interface DTXTransaction {
/**
* 事务组标识
*
* @return
* @return groupId
*/
String groupId();
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,44 +30,45 @@ public interface TransactionManager {
* 开始分布式事务
*
* @param dtxTransaction 分布式事务
* @throws TransactionException TransactionException
*/
void begin(DTXTransaction dtxTransaction) throws TransactionException;

/**
* 分布式事务成员加入
*
* @param dtxTransaction
* @param transactionUnit
* @throws TransactionException
* @param dtxTransaction dtxTransaction
* @param transactionUnit transactionUnit
* @throws TransactionException TransactionException
*/
void join(DTXTransaction dtxTransaction, TransactionUnit transactionUnit) throws TransactionException;

/**
* 提交分布式事务。出错会记录异常记录
*
* @param transaction
* @param transaction transaction
*/
void commit(DTXTransaction transaction);

/**
* 回滚分布式事务。出错会记录异常记录
*
* @param transaction
* @param transaction transaction
*/
void rollback(DTXTransaction transaction);

/**
* 关闭分布式事务。出错会记录异常记录
*
* @param groupTransaction
* @param groupTransaction groupTransaction
*/
void close(DTXTransaction groupTransaction);

/**
* 获取事务状态(补偿机制)。出错返回-1
*
* @param groupTransaction
* @return
* @param groupTransaction groupTransaction
* @return transactionState
*/
int transactionState(DTXTransaction groupTransaction);
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@
import java.util.Objects;

/**
* 消息创建器
* @author lorne
* @date 2018/12/2
* @description 消息创建器
*/
public class MessageCreator {

Expand All @@ -45,8 +44,8 @@ private static byte[] serialize(Object obj) {
/**
* 通知TxClient连接
*
* @param notifyConnectParams
* @return
* @param notifyConnectParams notifyConnectParams
* @return MessageDto
*/
public static MessageDto newTxManager(NotifyConnectParams notifyConnectParams) {
MessageDto msg = new MessageDto();
Expand All @@ -58,8 +57,8 @@ public static MessageDto newTxManager(NotifyConnectParams notifyConnectParams) {
/**
* 提交事务组
*
* @param notifyUnitParams
* @return
* @param notifyUnitParams notifyUnitParams
* @return MessageDto
*/
public static MessageDto notifyUnit(NotifyUnitParams notifyUnitParams) {
MessageDto msg = new MessageDto();
Expand All @@ -71,8 +70,9 @@ public static MessageDto notifyUnit(NotifyUnitParams notifyUnitParams) {

/**
* 关闭事务组正常响应
*
* @return
* @param action action
* @param message message
* @return MessageDto
*/
public static MessageDto notifyGroupOkResponse(Object message,String action) {
MessageDto messageDto = new MessageDto();
Expand All @@ -84,8 +84,9 @@ public static MessageDto notifyGroupOkResponse(Object message,String action) {

/**
* 关闭事务组失败响应
*
* @return
* @param action action
* @param message message
* @return MessageDto
*/
public static MessageDto notifyGroupFailResponse(Object message,String action) {
MessageDto messageDto = new MessageDto();
Expand All @@ -97,8 +98,8 @@ public static MessageDto notifyGroupFailResponse(Object message,String action) {

/**
* 服务器错误
*
* @return
* @param action action
* @return MessageDto
*/
public static MessageDto serverException(String action) {
MessageDto messageDto = new MessageDto();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,16 @@ public interface RpcExceptionHandler {
/**
* 通知事务单元业务异常
*
* @param params
* @param e
* @param params params
* @param e e
*/
void handleNotifyUnitBusinessException(Object params, Throwable e);

/**
* 通知事务单元通讯异常
*
* @param params
* @param e
* @param params params
* @param e e
*/
void handleNotifyUnitMessageException(Object params, Throwable e);
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,15 @@
import com.codingapi.txlcn.commons.exception.TxManagerException;

/**
* LCN分布式事务 manager业务处理
* @author lorne
* @date 2018/12/2
* @description LCN分布式事务 manager业务处理
*/
public interface RpcExecuteService {

/**
* 执行业务
*
* @return
* @param transactionCmd transactionCmd
* @return Object
*/
Object execute(TransactionCmd transactionCmd) throws TxManagerException;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@

/**
* @author lorne
* @date 2018/12/10
* @description
*/
@Service
@Slf4j
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@

/**
* @author lorne
* @date 2018/12/2
* @description
*/
@Data
public class TransactionCmd {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
* Manager信息改用Set 暂未使用
*
* @author meetzy
* @date 2019-01-14 11:09
*/
@Slf4j
public class RedisSetManagerStorage implements ManagerStorage {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@
import org.springframework.stereotype.Component;

/**
* BeanName 获取工具类
* @author lorne
* @date 2018/12/2
* @description BeanName 获取工具类
*/
@Component
public class ManagerRpcBeanHelper {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ public ExceptionList exceptionList(
* @param groupId groupId
* @param unitId unitId
* @return transaction info
* @throws TxManagerException TxManagerException
*/
@GetMapping("/log/transaction-info")
public JSONObject transactionInfo(
Expand All @@ -89,6 +90,9 @@ public JSONObject transactionInfo(
*
* @param page 页码
* @param limit 记录数
* @param groupId groupId
* @param tag tag
* @param timeOrder timeOrder
* @return TxLogList
*/
@GetMapping({"/logs/{page}", "/logs/{page}/{limit}", "/logs"})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* Description:
* Date: 2018/11/23
*
* @auther ujued
* @author ujued
*/
@Component
public class InterceptorConfigurer implements WebMvcConfigurer {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,34 +31,34 @@ public interface AdminService {
/**
* 登陆
*
* @param password
* @return
* @param password password
* @return token
*/
String login(String password) throws TxManagerException;

/**
* 查询TX 日志
*
* @param page
* @param limit
* @param groupId
* @param tag
* @param page page
* @param limit limit
* @param groupId groupId
* @param tag tag
* @param timeOrder 时间排序1 顺序 2 逆序
* @return
* @return TxLogList
*/
TxLogList txLogList(Integer page, Integer limit, String groupId, String tag, Integer timeOrder);

/**
* 分布式事务统计信息
*
* @return
* @return DTXInfo
*/
DTXInfo dtxInfo();

/**
* 获取TxManager信息
*
* @return
* @return TxManagerInfo
*/
TxManagerInfo getTxManagerInfo();
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,34 +31,38 @@ public interface TxExceptionService {
/**
* 写补偿记录
*
* @param writeTxExceptionReq
* @param writeTxExceptionReq writeTxExceptionReq
*/
void writeTxException(WriteTxExceptionDTO writeTxExceptionReq);


/**
* 获取事务状态
*
* @param groupId
* @return
* @param groupId groupId
* @return transactionState
*/
int transactionState(String groupId);

/**
* 获取补偿列表
*
* @param page
* @param limit
* @return
* @param page page
* @param limit limit
* @param keyword keyword
* @param registrar registrar
* @return ExceptionList
*/
ExceptionList exceptionList(Integer page, Integer limit, String keyword, int registrar);

/**
* Client 切面信息
*
* @param groupId
* @param unitId
* @return
* @param groupId groupId
* @param unitId unitId
* @return JSONObject
* @throws TxManagerException TxManagerException
* @throws TransactionStateException TransactionStateException
*/
JSONObject getTransactionInfo(String groupId, String unitId) throws TxManagerException, TransactionStateException;
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public interface TxExceptionListener {
/**
* 实务异常时
*
* @param txException
* @param txException txException
*/
void onException(TxException txException);
}

0 comments on commit 3f7e9fd

Please sign in to comment.