public boolean nextBuffer() throws TeiidComponentException, TeiidProcessingException { this.closeBuffer(); if (this.buffers == null || this.buffers.isEmpty()) { if (!sortUtility.isDoneReading()) { this.buffers = sortUtility.onePassSort(limited); return nextBuffer(); } return false; } this.buffer = this.buffers.remove(this.buffers.size() - 1); this.buffer.setForwardOnly(false); this.resetState(); return true; }
public boolean nextBuffer() throws TeiidComponentException, TeiidProcessingException { this.closeBuffer(); if (this.buffers == null || this.buffers.isEmpty()) { if (!sortUtility.isDoneReading()) { this.buffers = sortUtility.onePassSort(limited); return nextBuffer(); } return false; } this.buffer = this.buffers.remove(this.buffers.size() - 1); this.buffer.setForwardOnly(false); this.resetState(); return true; }
public boolean nextBuffer() throws TeiidComponentException, TeiidProcessingException { this.closeBuffer(); if (this.buffers == null || this.buffers.isEmpty()) { if (!sortUtility.isDoneReading()) { this.buffers = sortUtility.onePassSort(limited); return nextBuffer(); } return false; } this.buffer = this.buffers.remove(this.buffers.size() - 1); this.buffer.setForwardOnly(false); this.resetState(); return true; }
public List<TupleBuffer> onePassSort(boolean lowLatency) throws TeiidComponentException, TeiidProcessingException { boolean success = false; try { if(this.phase == INITIAL_SORT) { initialSort(true, lowLatency, -1); if (!isDoneReading()) { this.phase = INITIAL_SORT; } } for (TupleBuffer tb : activeTupleBuffers) { tb.close(); tb.setForwardOnly(false); //it is up to the caller to set the flag now } success = true; return activeTupleBuffers; } catch (BlockedException e) { success = true; throw e; } finally { if (!success) { remove(); } } }
public List<TupleBuffer> onePassSort(boolean lowLatency) throws TeiidComponentException, TeiidProcessingException { boolean success = false; try { if(this.phase == INITIAL_SORT) { initialSort(true, lowLatency, -1); if (!isDoneReading()) { this.phase = INITIAL_SORT; } } for (TupleBuffer tb : activeTupleBuffers) { tb.close(); tb.setForwardOnly(false); //it is up to the caller to set the flag now } success = true; return activeTupleBuffers; } catch (BlockedException e) { success = true; throw e; } finally { if (!success) { remove(); } } }
public List<TupleBuffer> onePassSort(boolean lowLatency) throws TeiidComponentException, TeiidProcessingException { boolean success = false; try { if(this.phase == INITIAL_SORT) { initialSort(true, lowLatency, -1); if (!isDoneReading()) { this.phase = INITIAL_SORT; } } for (TupleBuffer tb : activeTupleBuffers) { tb.close(); tb.setForwardOnly(false); //it is up to the caller to set the flag now } success = true; return activeTupleBuffers; } catch (BlockedException e) { success = true; throw e; } finally { if (!success) { remove(); } } }
if (this.buffers != null || sortUtility.isDoneReading()) { return; if (this.buffers.size() != 1 || !sortUtility.isDoneReading()) { nextBuffer(); return;
if (this.buffers != null || sortUtility.isDoneReading()) { return; if (this.buffers.size() != 1 || !sortUtility.isDoneReading()) { nextBuffer(); return;
if (this.buffers != null || sortUtility.isDoneReading()) { return; if (this.buffers.size() != 1 || !sortUtility.isDoneReading()) { nextBuffer(); return;
while (!this.notSortedSource.getSortUtility().isDoneReading() || this.notSortedSource.hasBuffer()) { if (!this.notSortedSource.hasBuffer()) { this.notSortedSource.nextBuffer();
while (!this.notSortedSource.getSortUtility().isDoneReading() || this.notSortedSource.hasBuffer()) { if (!this.notSortedSource.hasBuffer()) { this.notSortedSource.nextBuffer();
while (!this.notSortedSource.getSortUtility().isDoneReading() || this.notSortedSource.hasBuffer()) { if (!this.notSortedSource.hasBuffer()) { this.notSortedSource.nextBuffer();