@Override public Throwable createException(String message, Throwable cause) { return new TransactionNotActiveException(message); } });
@Override public Throwable createException(String message, Throwable cause) { return new TransactionNotActiveException(message); } });
private void checkActive(String serviceName, String name) { if (transaction.getState() != ACTIVE) { throw new TransactionNotActiveException("No transaction is found while accessing " + "transactional object -> " + serviceName + "[" + name + "]!"); } }
@Override public void add(TransactionLogRecord record) { if (state != Transaction.State.ACTIVE) { throw new TransactionNotActiveException("Transaction is not active!"); } transactionLog.add(record); }
@Override public void add(TransactionLogRecord record) { if (state != Transaction.State.ACTIVE) { throw new TransactionNotActiveException("Transaction is not active!"); } transactionLog.add(record); }
private void checkActive(String serviceName, String name) { if (transaction.getState() != ACTIVE) { throw new TransactionNotActiveException("No transaction is found while accessing " + "transactional object -> " + serviceName + "[" + name + "]!"); } }
void checkTransactionState() { if (!tx.getState().equals(Transaction.State.ACTIVE)) { throw new TransactionNotActiveException("Transaction is not active!"); } }
protected void checkTransactionActive() { if (!tx.getState().equals(Transaction.State.ACTIVE)) { throw new TransactionNotActiveException("Transaction is not active!"); } }
void checkTransactionState() { if (!tx.getState().equals(Transaction.State.ACTIVE)) { throw new TransactionNotActiveException("Transaction is not active!"); } }
void checkTransactionState() { if (!tx.getState().equals(Transaction.State.ACTIVE)) { throw new TransactionNotActiveException("Transaction is not active!"); } }
void checkTransactionActive() { if (!tx.getState().equals(Transaction.State.ACTIVE)) { throw new TransactionNotActiveException("Transaction is not active!"); } }
protected void checkTransactionActive() { if (!tx.getState().equals(Transaction.State.ACTIVE)) { throw new TransactionNotActiveException("Transaction is not active!"); } }
void checkTransactionState() { if (!tx.getState().equals(Transaction.State.ACTIVE)) { throw new TransactionNotActiveException("Transaction is not active!"); } }
@Override public void add(TransactionLogRecord record) { if (state != Transaction.State.ACTIVE) { throw new TransactionNotActiveException("Transaction is not active!"); } checkThread(); transactionLog.add(record); }
@Override public void add(TransactionLogRecord record) { if (state != Transaction.State.ACTIVE) { throw new TransactionNotActiveException("Transaction is not active!"); } checkThread(); transactionLog.add(record); }
void checkTransactionActive() { if (!tx.getState().equals(Transaction.State.ACTIVE)) { throw new TransactionNotActiveException("Transaction is not active!"); } }
@Override public <T extends TransactionalObject> T getTransactionalObject(String serviceName, String name) { if (transaction.getState() != Transaction.State.ACTIVE) { throw new TransactionNotActiveException("No transaction is found while accessing " + "transactional object -> " + serviceName + "[" + name + "]!"); } TransactionalObjectKey key = new TransactionalObjectKey(serviceName, name); TransactionalObject obj = txnObjectMap.get(key); if (obj == null) { if (serviceName.equals(QueueService.SERVICE_NAME)) { obj = new ClientTxnQueueProxy(name, this); } else if (serviceName.equals(MapService.SERVICE_NAME)) { obj = new ClientTxnMapProxy(name, this); } else if (serviceName.equals(MultiMapService.SERVICE_NAME)) { obj = new ClientTxnMultiMapProxy(name, this); } else if (serviceName.equals(ListService.SERVICE_NAME)) { obj = new ClientTxnListProxy(name, this); } else if (serviceName.equals(SetService.SERVICE_NAME)) { obj = new ClientTxnSetProxy(name, this); } if (obj == null) { throw new IllegalArgumentException("Service[" + serviceName + "] is not transactional!"); } txnObjectMap.put(key, obj); } return (T) obj; }
@Override public <T extends TransactionalObject> T getTransactionalObject(String serviceName, String name) { if (transaction.getState() != Transaction.State.ACTIVE) { throw new TransactionNotActiveException("No transaction is found while accessing " + "transactional object -> " + serviceName + "[" + name + "]!"); } TransactionalObjectKey key = new TransactionalObjectKey(serviceName, name); TransactionalObject obj = txnObjectMap.get(key); if (obj == null) { if (serviceName.equals(QueueService.SERVICE_NAME)) { obj = new ClientTxnQueueProxy(name, this); } else if (serviceName.equals(MapService.SERVICE_NAME)) { obj = new ClientTxnMapProxy(name, this); } else if (serviceName.equals(MultiMapService.SERVICE_NAME)) { obj = new ClientTxnMultiMapProxy(name, this); } else if (serviceName.equals(ListService.SERVICE_NAME)) { obj = new ClientTxnListProxy(name, this); } else if (serviceName.equals(SetService.SERVICE_NAME)) { obj = new ClientTxnSetProxy(name, this); } if (obj == null) { throw new IllegalArgumentException("Service[" + serviceName + "] is not transactional!"); } txnObjectMap.put(key, obj); } return (T) obj; }
@Override public <T extends TransactionalObject> T getTransactionalObject(String serviceName, String name) { if (transaction.getState() != Transaction.State.ACTIVE) { throw new TransactionNotActiveException("No transaction is found while accessing " + "transactional object -> " + serviceName + "[" + name + "]!"); } TransactionalObjectKey key = new TransactionalObjectKey(serviceName, name); TransactionalObject obj = txnObjectMap.get(key); if (obj == null) { if (serviceName.equals(QueueService.SERVICE_NAME)) { obj = new ClientTxnQueueProxy(name, this); } else if (serviceName.equals(MapService.SERVICE_NAME)) { obj = new ClientTxnMapProxy(name, this); } else if (serviceName.equals(MultiMapService.SERVICE_NAME)) { obj = new ClientTxnMultiMapProxy(name, this); } else if (serviceName.equals(ListService.SERVICE_NAME)) { obj = new ClientTxnListProxy(name, this); } else if (serviceName.equals(SetService.SERVICE_NAME)) { obj = new ClientTxnSetProxy(name, this); } if (obj == null) { throw new IllegalArgumentException("Service[" + serviceName + "] is not transactional!"); } txnObjectMap.put(key, obj); } return (T) obj; }
@Override public <T extends TransactionalObject> T getTransactionalObject(String serviceName, String name) { if (transaction.getState() != Transaction.State.ACTIVE) { throw new TransactionNotActiveException("No transaction is found while accessing " + "transactional object -> " + serviceName + "[" + name + "]!"); } TransactionalObjectKey key = new TransactionalObjectKey(serviceName, name); TransactionalObject obj = txnObjectMap.get(key); if (obj == null) { if (serviceName.equals(QueueService.SERVICE_NAME)) { obj = new ClientTxnQueueProxy(name, this); } else if (serviceName.equals(MapService.SERVICE_NAME)) { obj = new ClientTxnMapProxy(name, this); } else if (serviceName.equals(MultiMapService.SERVICE_NAME)) { obj = new ClientTxnMultiMapProxy(name, this); } else if (serviceName.equals(ListService.SERVICE_NAME)) { obj = new ClientTxnListProxy(name, this); } else if (serviceName.equals(SetService.SERVICE_NAME)) { obj = new ClientTxnSetProxy(name, this); } if (obj == null) { throw new IllegalArgumentException("Service[" + serviceName + "] is not transactional!"); } txnObjectMap.put(key, obj); } return (T) obj; }