@Override public synchronized void dataAvailable() { RequestWorkItem requestWorkItem = this.commandContext.getWorkItem(); dataAvailable = true; if (requestWorkItem != null) { requestWorkItem.moreWork(); } }
@Override public synchronized void dataAvailable() { RequestWorkItem requestWorkItem = this.commandContext.getWorkItem(); dataAvailable = true; if (requestWorkItem != null) { requestWorkItem.moreWork(); } }
@Override public synchronized void dataAvailable() { RequestWorkItem requestWorkItem = this.commandContext.getWorkItem(); dataAvailable = true; if (requestWorkItem != null) { requestWorkItem.moreWork(); } }
/** * Submit work that will notify the request work item of more work when complete * @param callable * @return */ public <V> Future<V> submit(Callable<V> callable) { if (getWorkItem() != null) { return getWorkItem().addRequestWork(callable); } return ForkJoinPool.commonPool().submit(callable); }
/** * Submit work that will notify the request work item of more work when complete * @param callable * @return */ public <V> Future<V> submit(Callable<V> callable) { if (getWorkItem() != null) { return getWorkItem().addRequestWork(callable); } return ForkJoinPool.commonPool().submit(callable); }
@Override public void run() { try { process(); } catch (TeiidRuntimeException e) { asynchException = e; } catch (Throwable e) { asynchException = new TeiidRuntimeException(e); } finally { running = false; RequestWorkItem workItem = TextTableNode.this.getContext().getWorkItem(); if (workItem != null) { workItem.moreWork(); } else { synchronized (TextTableNode.this) { TextTableNode.this.notifyAll(); } } } } });
@Override public void run() { try { process(); } catch (TeiidRuntimeException e) { asynchException = e; } catch (Throwable e) { asynchException = new TeiidRuntimeException(e); } finally { running = false; RequestWorkItem workItem = TextTableNode.this.getContext().getWorkItem(); if (workItem != null) { workItem.moreWork(); } else { synchronized (TextTableNode.this) { TextTableNode.this.notifyAll(); } } } } });
@Override public void run() { try { process(); } catch (TeiidRuntimeException e) { asynchException = e; } catch (Throwable e) { asynchException = new TeiidRuntimeException(e); } finally { running = false; RequestWorkItem workItem = TextTableNode.this.getContext().getWorkItem(); if (workItem != null) { workItem.moreWork(); } else { synchronized (TextTableNode.this) { TextTableNode.this.notifyAll(); } } } } });
spins = (Integer)value; context.getWorkItem().scheduleWork(100*(1<<Math.min(spins, 7))); context.setSessionVariable(key, ++spins); throw BlockedException.INSTANCE;
spins = (Integer)value; context.getWorkItem().scheduleWork(100*(1<<Math.min(spins, 7))); context.setSessionVariable(key, ++spins); throw BlockedException.INSTANCE;
if (cc != null && cc.getWorkItem() != null) { end = System.nanoTime() + (cc.getTimeSliceEnd()-System.currentTimeMillis())*1000000; break outer; } else if (end != Long.MAX_VALUE && (this.workingBuffer.getRowCount()%32)==1 && System.nanoTime() > end) { CommandContext.getThreadLocalContext().getWorkItem().moreWork(); throw BlockedException.block("Blocking on large sort"); //$NON-NLS-1$
if (cc != null && cc.getWorkItem() != null) { end = System.nanoTime() + (cc.getTimeSliceEnd()-System.currentTimeMillis())*1000000; break outer; } else if (end != Long.MAX_VALUE && (this.workingBuffer.getRowCount()%32)==1 && System.nanoTime() > end) { CommandContext.getThreadLocalContext().getWorkItem().moreWork(); throw BlockedException.block("Blocking on large sort"); //$NON-NLS-1$
if (this.getContext().getWorkItem() == null) {
if (this.getContext().getWorkItem() == null) {
if (this.getContext().getWorkItem() == null) {
RequestWorkItem workItem = this.getContext().getWorkItem(); if (workItem != null) {
RequestWorkItem workItem = this.getContext().getWorkItem(); if (workItem != null) {
synchronized (info) { if (!info.isUpToDate()) { RequestWorkItem workItem = context.getWorkItem(); info.addWaiter(workItem); if (moreWork != null) {
synchronized (info) { if (!info.isUpToDate()) { RequestWorkItem workItem = context.getWorkItem(); info.addWaiter(workItem); if (moreWork != null) {
synchronized (info) { if (!info.isUpToDate()) { RequestWorkItem workItem = context.getWorkItem(); info.addWaiter(workItem); if (moreWork != null) {