public class TxnQueueComponent extends Object
| 构造器和说明 |
|---|
TxnQueueComponent(String queueName,
org.iq80.leveldb.DB db) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
commit(EventTxnStatus txnStatus) |
int |
countOfTxn()
当前未提交的事务数量,这个方法调用会消耗一定性能,调用过程中需要通过线程锁,保证获取的数据是最新的,所以尽可能的减少调用
|
Integer |
getDiscardCapacity() |
Integer |
getFailureCapacity() |
Integer |
getRetryCount() |
Integer |
getTxnCapacity() |
EventTxnStatus |
getTxnStatus(String eventId,
Class<? extends EventListener> listenerType,
String txnId) |
EventTxnStatus |
getTxnStatus(String eventId,
Class<? extends EventListener> listenerType,
String txnId,
org.iq80.leveldb.WriteBatch writeBatch) |
void |
houseKeeping() |
boolean |
isOpenRetry() |
void |
open() |
void |
resumeTxn(ResumeTxnHandler handler) |
void |
setDiscardCapacity(Integer discardCapacity) |
void |
setFailureCapacity(Integer failureCapacity) |
void |
setOpenRetry(boolean openRetry) |
void |
setRetryCount(Integer retryCount) |
void |
setTxnCapacity(Integer txnCapacity) |
void |
shutdown() |
public TxnQueueComponent(String queueName, org.iq80.leveldb.DB db)
public void open()
throws IOException
IOExceptionpublic int countOfTxn()
throws Exception
Exceptionpublic void shutdown()
public Integer getTxnCapacity()
public void setTxnCapacity(Integer txnCapacity)
public Integer getFailureCapacity()
public void setFailureCapacity(Integer failureCapacity)
public Integer getDiscardCapacity()
public void setDiscardCapacity(Integer discardCapacity)
public Integer getRetryCount()
public void setRetryCount(Integer retryCount)
public boolean isOpenRetry()
public void setOpenRetry(boolean openRetry)
public void resumeTxn(ResumeTxnHandler handler) throws IllegalAccessException, IOException
public EventTxnStatus getTxnStatus(String eventId, Class<? extends EventListener> listenerType, String txnId) throws Exception
Exceptionpublic EventTxnStatus getTxnStatus(String eventId, Class<? extends EventListener> listenerType, String txnId, org.iq80.leveldb.WriteBatch writeBatch) throws Exception
Exceptionpublic void commit(EventTxnStatus txnStatus) throws Exception
Exceptionpublic void houseKeeping()
throws IOException
IOExceptionCopyright © 2018 Jue Ming. All rights reserved.