public void commitAsync(NodeEngine nodeEngine, ExecutionCallback callback) { for (TransactionLogRecord record : recordList) { invokeAsync(nodeEngine, callback, record, record.newCommitOperation()); } }
public void rollbackAsync(NodeEngine nodeEngine, ExecutionCallback callback) { for (TransactionLogRecord record : recordList) { invokeAsync(nodeEngine, callback, record, record.newRollbackOperation()); } }
private void createBackupLogs() { if (backupLogsCreated || skipBackupLogReplication()) { return; } forceCreateBackupLogs(); }
@Override public void commitTransaction() throws TransactionException { if (transaction.requiresPrepare()) { transaction.prepare(); } transaction.commit(); }
@SuppressWarnings("unchecked") @Override public <K, V> TransactionalMultiMap<K, V> getMultiMap(String name) { return (TransactionalMultiMap<K, V>) getTransactionalObject(MultiMapService.SERVICE_NAME, name); }
/** * Creates a plain transaction object which can be used while cluster state is {@link ClusterState#PASSIVE}, * without wrapping it inside a TransactionContext. * <p/> * Also see {@link TransactionManagerServiceImpl#newTransaction(TransactionOptions)} for more details * * @param options transaction options * @return a new transaction which can be used while cluster state is {@link ClusterState#PASSIVE} */ public Transaction newAllowedDuringPassiveStateTransaction(TransactionOptions options) { return new AllowedDuringPassiveStateTransactionImpl(this, nodeEngine, options, null); }
TransactionContextImpl(TransactionManagerServiceImpl transactionManagerService, NodeEngineImpl nodeEngine, TransactionOptions options, String ownerUuid, boolean originatedFromClient) { this.nodeEngine = nodeEngine; this.transaction = new TransactionImpl(transactionManagerService, nodeEngine, options, ownerUuid, originatedFromClient); }
@Override public void commitTransaction() throws TransactionException { if (transaction.requiresPrepare()) { transaction.prepare(); } transaction.commit(); }
public void commitAsync(NodeEngine nodeEngine, ExecutionCallback callback) { for (TransactionLogRecord record : recordList) { invokeAsync(nodeEngine, callback, record, record.newCommitOperation()); } }
public void rollbackAsync(NodeEngine nodeEngine, ExecutionCallback callback) { for (TransactionLogRecord record : recordList) { invokeAsync(nodeEngine, callback, record, record.newRollbackOperation()); } }
private void createBackupLogs() { if (backupLogsCreated || skipBackupLogReplication()) { return; } forceCreateBackupLogs(); }
@SuppressWarnings("unchecked") @Override public <E> TransactionalQueue<E> getQueue(String name) { return (TransactionalQueue<E>) getTransactionalObject(QueueService.SERVICE_NAME, name); }
/** * Creates a plain transaction object which can be used while cluster state is {@link ClusterState#PASSIVE}, * without wrapping it inside a TransactionContext. * <p/> * Also see {@link TransactionManagerServiceImpl#newTransaction(TransactionOptions)} for more details * * @param options transaction options * @return a new transaction which can be used while cluster state is {@link ClusterState#PASSIVE} */ public Transaction newAllowedDuringPassiveStateTransaction(TransactionOptions options) { return new AllowedDuringPassiveStateTransactionImpl(this, nodeEngine, options, null); }
@SuppressWarnings("unchecked") @Override public <E> TransactionalList<E> getList(String name) { return (TransactionalList<E>) getTransactionalObject(ListService.SERVICE_NAME, name); }
@SuppressWarnings("unchecked") @Override public <K, V> TransactionalMap<K, V> getMap(String name) { return (TransactionalMap<K, V>) getTransactionalObject(MapService.SERVICE_NAME, name); }
@SuppressWarnings("unchecked") @Override public <K, V> TransactionalMultiMap<K, V> getMultiMap(String name) { return (TransactionalMultiMap<K, V>) getTransactionalObject(MultiMapService.SERVICE_NAME, name); }
@SuppressWarnings("unchecked") @Override public <K, V> TransactionalMap<K, V> getMap(String name) { return (TransactionalMap<K, V>) getTransactionalObject(MapService.SERVICE_NAME, name); }
@SuppressWarnings("unchecked") @Override public <E> TransactionalQueue<E> getQueue(String name) { return (TransactionalQueue<E>) getTransactionalObject(QueueService.SERVICE_NAME, name); }
@SuppressWarnings("unchecked") @Override public <E> TransactionalSet<E> getSet(String name) { return (TransactionalSet<E>) getTransactionalObject(SetService.SERVICE_NAME, name); }