public ResultsFuture<?> commit(final XidImpl xid, final boolean onePhase) throws XATransactionException { Callable<Void> processor = new Callable<Void>() { @Override public Void call() throws Exception { DQPWorkContext workContext = DQPWorkContext.getWorkContext(); getTransactionService().commit(workContext.getSessionId(), xid, onePhase, workContext.getSession().isEmbedded()); return null; } }; return addWork(processor, 0); } // global txn
@Override protected void resumeProcessing() { if (!this.useCallingThread) { dqpCore.addWork(this); } }
public ResultsFuture<?> rollback(final XidImpl xid) throws XATransactionException { Callable<Void> processor = new Callable<Void>() { @Override public Void call() throws Exception { DQPWorkContext workContext = DQPWorkContext.getWorkContext(); getTransactionService().rollback(workContext.getSessionId(),xid, workContext.getSession().isEmbedded()); return null; } }; return addWork(processor, 0); } // global txn
@Override protected void resumeProcessing() { if (!this.useCallingThread) { dqpCore.addWork(this); } }
public ResultsFuture<?> commit(final XidImpl xid, final boolean onePhase) throws XATransactionException { Callable<Void> processor = new Callable<Void>() { @Override public Void call() throws Exception { DQPWorkContext workContext = DQPWorkContext.getWorkContext(); getTransactionService().commit(workContext.getSessionId(), xid, onePhase, workContext.getSession().isEmbedded()); return null; } }; return addWork(processor, 0); } // global txn
public ResultsFuture<?> commit(final XidImpl xid, final boolean onePhase) throws XATransactionException { Callable<Void> processor = new Callable<Void>() { @Override public Void call() throws Exception { DQPWorkContext workContext = DQPWorkContext.getWorkContext(); getTransactionService().commit(workContext.getSessionId(), xid, onePhase, workContext.getSession().isEmbedded()); return null; } }; return addWork(processor, 0); } // global txn
public ResultsFuture<Integer> prepare(final XidImpl xid) throws XATransactionException { Callable<Integer> processor = new Callable<Integer>() { @Override public Integer call() throws Exception { DQPWorkContext workContext = DQPWorkContext.getWorkContext(); return getTransactionService().prepare(workContext.getSessionId(),xid, workContext.getSession().isEmbedded()); } }; return addWork(processor, 10); }
public ResultsFuture<?> rollback(final XidImpl xid) throws XATransactionException { Callable<Void> processor = new Callable<Void>() { @Override public Void call() throws Exception { DQPWorkContext workContext = DQPWorkContext.getWorkContext(); getTransactionService().rollback(workContext.getSessionId(),xid, workContext.getSession().isEmbedded()); return null; } }; return addWork(processor, 0); } // global txn
public ResultsFuture<Integer> prepare(final XidImpl xid) throws XATransactionException { Callable<Integer> processor = new Callable<Integer>() { @Override public Integer call() throws Exception { DQPWorkContext workContext = DQPWorkContext.getWorkContext(); return getTransactionService().prepare(workContext.getSessionId(),xid, workContext.getSession().isEmbedded()); } }; return addWork(processor, 10); }
public ResultsFuture<?> commit() throws XATransactionException { final String threadId = DQPWorkContext.getWorkContext().getSessionId(); Callable<Void> processor = new Callable<Void>() { @Override public Void call() throws Exception { getTransactionService().commit(threadId); return null; } }; return addWork(processor, 0); }
public ResultsFuture<?> commit() throws XATransactionException { final String threadId = DQPWorkContext.getWorkContext().getSessionId(); Callable<Void> processor = new Callable<Void>() { @Override public Void call() throws Exception { getTransactionService().commit(threadId); return null; } }; return addWork(processor, 0); }
private void startActivePlan(RequestWorkItem workItem, boolean addToQueue) { boolean continuous = workItem.requestMsg.getRequestOptions().isContinuous(); workItem.active = !continuous; if (addToQueue) { this.addWork(workItem); } if (!continuous) { this.currentlyActivePlans++; } }
public ResultsFuture<?> commit() throws XATransactionException { final String threadId = DQPWorkContext.getWorkContext().getSessionId(); Callable<Void> processor = new Callable<Void>() { @Override public Void call() throws Exception { getTransactionService().commit(threadId); return null; } }; return addWork(processor, 0); }
private void startActivePlan(RequestWorkItem workItem, boolean addToQueue) { boolean continuous = workItem.requestMsg.getRequestOptions().isContinuous(); workItem.active = !continuous; if (addToQueue) { this.addWork(workItem); } if (!continuous) { this.currentlyActivePlans++; } }
public ResultsFuture<?> rollback() throws XATransactionException { final String threadId = DQPWorkContext.getWorkContext().getSessionId(); Callable<Void> processor = new Callable<Void>() { @Override public Void call() throws Exception { getTransactionService().rollback(threadId); return null; } }; return addWork(processor, 0); }
private void startActivePlan(RequestWorkItem workItem, boolean addToQueue) { boolean continuous = workItem.requestMsg.getRequestOptions().isContinuous(); workItem.active = !continuous; if (addToQueue) { this.addWork(workItem); } if (!continuous) { this.currentlyActivePlans++; } }
public ResultsFuture<?> rollback() throws XATransactionException { final String threadId = DQPWorkContext.getWorkContext().getSessionId(); Callable<Void> processor = new Callable<Void>() { @Override public Void call() throws Exception { getTransactionService().rollback(threadId); return null; } }; return addWork(processor, 0); }
<T> FutureWork<T> addHighPriorityWork(Callable<T> callable) { FutureWork<T> work = new FutureWork<T>(callable, PrioritizedRunnable.NO_WAIT_PRIORITY); work.setRequestId(this.requestID.toString()); dqpCore.addWork(work); return work; }
public <T> FutureWork<T> addRequestWork(Callable<T> callable) { FutureWork<T> work = new FutureWork<T>(callable, 100); work.addCompletionListener(new CompletionListener<T>() { @Override public void onCompletion(FutureWork<T> future) { RequestWorkItem.this.moreWork(); } }); work.setRequestId(this.requestID.toString()); dqpCore.addWork(work); return work; }
public <T> FutureWork<T> addRequestWork(Callable<T> callable) { FutureWork<T> work = new FutureWork<T>(callable, 100); work.addCompletionListener(new CompletionListener<T>() { @Override public void onCompletion(FutureWork<T> future) { RequestWorkItem.this.moreWork(); } }); work.setRequestId(this.requestID.toString()); dqpCore.addWork(work); return work; }