@Component(value="blStreamingTransactionCapableUtil") @Scope(value="prototype") public class StreamingTransactionCapableUtil extends Object implements StreamingTransactionCapable
Modifier and Type | Field and Description |
---|---|
protected javax.persistence.EntityManager |
em |
protected int |
pageSize |
protected int |
retryMax |
protected org.springframework.transaction.PlatformTransactionManager |
transactionManager |
Constructor and Description |
---|
StreamingTransactionCapableUtil() |
Modifier and Type | Method and Description |
---|---|
protected <G extends Throwable> |
endTransaction(org.springframework.transaction.TransactionStatus status,
boolean error,
Class<G> exceptionType) |
int |
getPageSize() |
int |
getRetryMax() |
org.springframework.transaction.PlatformTransactionManager |
getTransactionManager() |
void |
init() |
<G extends Throwable> |
runOptionalTransactionalOperation(StreamCapableTransactionalOperation operation,
Class<G> exceptionType,
boolean useTransaction) |
<G extends Throwable> |
runOptionalTransactionalOperation(StreamCapableTransactionalOperation operation,
Class<G> exceptionType,
boolean useTransaction,
int transactionBehavior,
int isolationLevel) |
<G extends Throwable> |
runStreamingTransactionalOperation(StreamCapableTransactionalOperation streamOperation,
Class<G> exceptionType) |
<G extends Throwable> |
runStreamingTransactionalOperation(StreamCapableTransactionalOperation streamOperation,
Class<G> exceptionType,
int transactionBehavior,
int isolationLevel) |
<G extends Throwable> |
runTransactionalOperation(StreamCapableTransactionalOperation operation,
Class<G> exceptionType) |
<G extends Throwable> |
runTransactionalOperation(StreamCapableTransactionalOperation operation,
Class<G> exceptionType,
int transactionBehavior,
int isolationLevel) |
void |
setPageSize(int pageSize) |
void |
setRetryMax(int retryMax) |
void |
setTransactionManager(org.springframework.transaction.PlatformTransactionManager transactionManager) |
protected org.springframework.transaction.TransactionStatus |
startTransaction(int propagationBehavior,
int isolationLevel) |
protected org.springframework.transaction.PlatformTransactionManager transactionManager
protected javax.persistence.EntityManager em
@Value(value="${streaming.transaction.lock.retry.max}") protected int retryMax
@Value(value="${streaming.transaction.item.page.size}") protected int pageSize
@PostConstruct public void init()
public <G extends Throwable> void runStreamingTransactionalOperation(StreamCapableTransactionalOperation streamOperation, Class<G> exceptionType) throws G extends Throwable
runStreamingTransactionalOperation
in interface StreamingTransactionCapable
G extends Throwable
public <G extends Throwable> void runStreamingTransactionalOperation(StreamCapableTransactionalOperation streamOperation, Class<G> exceptionType, int transactionBehavior, int isolationLevel) throws G extends Throwable
runStreamingTransactionalOperation
in interface StreamingTransactionCapable
G extends Throwable
public <G extends Throwable> void runTransactionalOperation(StreamCapableTransactionalOperation operation, Class<G> exceptionType) throws G extends Throwable
runTransactionalOperation
in interface StreamingTransactionCapable
G extends Throwable
public <G extends Throwable> void runTransactionalOperation(StreamCapableTransactionalOperation operation, Class<G> exceptionType, int transactionBehavior, int isolationLevel) throws G extends Throwable
runTransactionalOperation
in interface StreamingTransactionCapable
G extends Throwable
public <G extends Throwable> void runOptionalTransactionalOperation(StreamCapableTransactionalOperation operation, Class<G> exceptionType, boolean useTransaction) throws G extends Throwable
runOptionalTransactionalOperation
in interface StreamingTransactionCapable
G extends Throwable
public <G extends Throwable> void runOptionalTransactionalOperation(StreamCapableTransactionalOperation operation, Class<G> exceptionType, boolean useTransaction, int transactionBehavior, int isolationLevel) throws G extends Throwable
runOptionalTransactionalOperation
in interface StreamingTransactionCapable
G extends Throwable
public int getPageSize()
getPageSize
in interface StreamingTransactionCapable
public void setPageSize(int pageSize)
setPageSize
in interface StreamingTransactionCapable
public org.springframework.transaction.PlatformTransactionManager getTransactionManager()
getTransactionManager
in interface StreamingTransactionCapable
public void setTransactionManager(org.springframework.transaction.PlatformTransactionManager transactionManager)
setTransactionManager
in interface StreamingTransactionCapable
public int getRetryMax()
getRetryMax
in interface StreamingTransactionCapable
public void setRetryMax(int retryMax)
setRetryMax
in interface StreamingTransactionCapable
protected <G extends Throwable> void endTransaction(org.springframework.transaction.TransactionStatus status, boolean error, Class<G> exceptionType) throws G extends Throwable
G extends Throwable
protected org.springframework.transaction.TransactionStatus startTransaction(int propagationBehavior, int isolationLevel)
Copyright © 2014. All rights reserved.