private void setDirectValues(List<List<?>> values) { if (managedBatch != null && trackingObject == null) { stree.getBatchManager(children == null).remove(managedBatch); managedBatch = null; trackingObject = null; } this.values = values; }
protected void remove(boolean force) { if (managedBatch != null) { if (force || trackingObject == null) { stree.getBatchManager(children == null).remove(managedBatch); } managedBatch = null; trackingObject = null; } values = null; children = null; }
protected void remove(boolean force) { if (managedBatch != null) { if (force || trackingObject == null) { stree.getBatchManager(children == null).remove(managedBatch); } managedBatch = null; trackingObject = null; } values = null; children = null; }
private void setDirectValues(List<List<?>> values) { if (managedBatch != null && trackingObject == null) { stree.getBatchManager(children == null).remove(managedBatch); managedBatch = null; trackingObject = null; } this.values = values; }
protected void remove(boolean force) { if (managedBatch != null) { if (force || trackingObject == null) { stree.getBatchManager(children == null).remove(managedBatch); } managedBatch = null; trackingObject = null; } values = null; children = null; }
private void setDirectValues(List<List<?>> values) { if (managedBatch != null && trackingObject == null) { stree.getBatchManager(children == null).remove(managedBatch); managedBatch = null; trackingObject = null; } this.values = values; }
protected List<List<?>> getValues() throws TeiidComponentException { if (values != null) { return values; } if (managedBatch == null) { throw new AssertionError("Batch removed"); //$NON-NLS-1$ } for (int i = 0; i < 10; i++) { CleanupReference ref = (CleanupReference)QUEUE.poll(); if (ref == null) { break; } if (REFERENCES.remove(ref.batch) != null) { ref.cleanup(); } } List<List<?>> result = stree.getBatchManager(children == null).getBatch(managedBatch, true); if (trackingObject != null) { return new LightWeightCopyOnWriteList<List<?>>(result); } return result; }
public SPage clone(STree tree) { try { if (this.managedBatch != null && trackingObject == null) { this.trackingObject = new Object(); CleanupReference managedBatchReference = new CleanupReference(trackingObject, managedBatch, stree.getBatchManager(children == null).getBatchManagerReference()); REFERENCES.put(managedBatch, managedBatchReference); } SPage clone = (SPage) super.clone(); clone.stree = tree; if (children != null) { clone.children = new ResizingArrayList<SPage>(children); } if (values != null) { clone.values = new ResizingArrayList<List<?>>(values); } return clone; } catch (CloneNotSupportedException e) { throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30038, e); } }
protected void setValues(List<List<?>> values) throws TeiidComponentException { if (values instanceof LightWeightCopyOnWriteList<?>) { values = ((LightWeightCopyOnWriteList<List<?>>)values).getList(); } if (values.size() < stree.minPageSize || stree.getRowCount() < stree.minStorageSize) { setDirectValues(values); return; } else if (stree.batchInsert && children == null && values.size() < stree.leafSize) { setDirectValues(values); stree.incompleteInsert = this; return; } this.values = null; managedBatch = stree.getBatchManager(children == null).createManagedBatch(values, managedBatch, trackingObject == null); this.trackingObject = null; }
public SPage clone(STree tree) { try { if (this.managedBatch != null && trackingObject == null) { this.trackingObject = new Object(); CleanupReference managedBatchReference = new CleanupReference(trackingObject, managedBatch, stree.getBatchManager(children == null).getBatchManagerReference()); REFERENCES.put(managedBatch, managedBatchReference); } SPage clone = (SPage) super.clone(); clone.stree = tree; if (children != null) { clone.children = new ResizingArrayList<SPage>(children); } if (values != null) { clone.values = new ResizingArrayList<List<?>>(values); } return clone; } catch (CloneNotSupportedException e) { throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30038, e); } }
protected void setValues(List<List<?>> values) throws TeiidComponentException { if (values instanceof LightWeightCopyOnWriteList<?>) { values = ((LightWeightCopyOnWriteList<List<?>>)values).getList(); } if (values.size() < stree.minPageSize || stree.getRowCount() < stree.minStorageSize) { setDirectValues(values); return; } else if (stree.batchInsert && children == null && values.size() < stree.leafSize) { setDirectValues(values); stree.incompleteInsert = this; return; } this.values = null; managedBatch = stree.getBatchManager(children == null).createManagedBatch(values, managedBatch, trackingObject == null); this.trackingObject = null; }
protected void setValues(List<List<?>> values) throws TeiidComponentException { if (values instanceof LightWeightCopyOnWriteList<?>) { values = ((LightWeightCopyOnWriteList<List<?>>)values).getList(); } if (values.size() < stree.minPageSize || stree.getRowCount() < stree.minStorageSize) { setDirectValues(values); return; } else if (stree.batchInsert && children == null && values.size() < stree.leafSize) { setDirectValues(values); stree.incompleteInsert = this; return; } this.values = null; managedBatch = stree.getBatchManager(children == null).createManagedBatch(values, managedBatch, trackingObject == null); this.trackingObject = null; }
public SPage clone(STree tree) { try { if (this.managedBatch != null && trackingObject == null) { this.trackingObject = new Object(); CleanupReference managedBatchReference = new CleanupReference(trackingObject, managedBatch, stree.getBatchManager(children == null).getBatchManagerReference()); REFERENCES.put(managedBatch, managedBatchReference); } SPage clone = (SPage) super.clone(); clone.stree = tree; if (children != null) { clone.children = new ResizingArrayList<SPage>(children); } if (values != null) { clone.values = new ResizingArrayList<List<?>>(values); } return clone; } catch (CloneNotSupportedException e) { throw new TeiidRuntimeException(QueryPlugin.Event.TEIID30038, e); } }
protected List<List<?>> getValues() throws TeiidComponentException { if (values != null) { return values; } if (managedBatch == null) { //we need this to be a check exception as the batch can be removed //by the size check at the buffermanager level throw new TeiidComponentException("Batch removed"); //$NON-NLS-1$ } for (int i = 0; i < 10; i++) { CleanupReference ref = (CleanupReference)QUEUE.poll(); if (ref == null) { break; } if (REFERENCES.remove(ref.batch) != null) { ref.cleanup(); } } List<List<?>> result = stree.getBatchManager(children == null).getBatch(managedBatch, true); if (trackingObject != null) { return new LightWeightCopyOnWriteList<List<?>>(result); } return result; }
protected List<List<?>> getValues() throws TeiidComponentException { if (values != null) { return values; } if (managedBatch == null) { //we need this to be a check exception as the batch can be removed //by the size check at the buffermanager level throw new TeiidComponentException("Batch removed"); //$NON-NLS-1$ } for (int i = 0; i < 10; i++) { CleanupReference ref = (CleanupReference)QUEUE.poll(); if (ref == null) { break; } if (REFERENCES.remove(ref.batch) != null) { ref.cleanup(); } } List<List<?>> result = stree.getBatchManager(children == null).getBatch(managedBatch, true); if (trackingObject != null) { return new LightWeightCopyOnWriteList<List<?>>(result); } return result; }