public class CacheTransactionManagerImp extends Object implements CacheTransactionManager
| Constructor and Description |
|---|
CacheTransactionManagerImp() |
CacheTransactionManagerImp(String transactionPath,
long timeout) |
| Modifier and Type | Method and Description |
|---|---|
org.brandao.brcache.tx.CacheTransactionHandler |
begin(BasicCache cache) |
void |
close(org.brandao.brcache.tx.CacheTransactionHandler tx) |
void |
commit(Serializable txId) |
org.brandao.brcache.tx.CacheTransactionHandler |
getCurrrent() |
org.brandao.brcache.tx.CacheTransactionHandler |
getCurrrent(boolean required) |
String |
getPath() |
long |
getTimeout() |
void |
lock(Serializable txId,
String key) |
void |
rollback(Serializable txId) |
void |
setPath(String value) |
void |
setTimeout(long value) |
void |
tryLock(Serializable txId,
String key,
long time,
TimeUnit unit) |
void |
unlock(Serializable txId,
String key) |
public CacheTransactionManagerImp()
public CacheTransactionManagerImp(String transactionPath, long timeout)
public void lock(Serializable txId, String key) throws TransactionException
lock in interface CacheTransactionManagerTransactionExceptionpublic void tryLock(Serializable txId, String key, long time, TimeUnit unit) throws TransactionException
tryLock in interface CacheTransactionManagerTransactionExceptionpublic void unlock(Serializable txId, String key) throws TransactionException
unlock in interface CacheTransactionManagerTransactionExceptionpublic void commit(Serializable txId) throws TransactionException
commit in interface CacheTransactionManagerTransactionExceptionpublic void rollback(Serializable txId) throws TransactionException
rollback in interface CacheTransactionManagerTransactionExceptionpublic void setPath(String value)
setPath in interface CacheTransactionManagerpublic String getPath()
getPath in interface CacheTransactionManagerpublic long getTimeout()
getTimeout in interface CacheTransactionManagerpublic void setTimeout(long value)
setTimeout in interface CacheTransactionManagerpublic org.brandao.brcache.tx.CacheTransactionHandler begin(BasicCache cache)
begin in interface CacheTransactionManagerpublic org.brandao.brcache.tx.CacheTransactionHandler getCurrrent()
getCurrrent in interface CacheTransactionManagerpublic org.brandao.brcache.tx.CacheTransactionHandler getCurrrent(boolean required)
getCurrrent in interface CacheTransactionManagerpublic void close(org.brandao.brcache.tx.CacheTransactionHandler tx)
throws TransactionException
close in interface CacheTransactionManagerTransactionExceptionCopyright © 2016. All rights reserved.