java.lang.Object
org.elasticsearch.compute.data.AbstractVectorBuilder
- All Implemented Interfaces:
Closeable,AutoCloseable,Vector.Builder,org.elasticsearch.core.Releasable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final BlockFactoryprotected longThe number of bytes currently estimated with the breaker.protected int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidadjustBreaker(long deltaBytes) protected final voidbuilt()Called during implementations ofBlock.Builder.build()as a last step to mark the Builder as closed and make sure that further closes don't double free memory.final voidclose()protected abstract intThe number of bytes used to represent each value element.protected final voidlongAn estimate of the number of bytes theVectorcreated byVector.Builder.build()will use.protected voidCalled when firstclosed.protected final voidfinish()Called during implementations ofBlock.Builder.build()as a first step to check if the block is still open and to finish the last position.protected abstract voidgrowValuesArray(int newSize) booleanprotected abstract intThe length of the internal values array.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.compute.data.Vector.Builder
build
-
Field Details
-
valueCount
protected int valueCount -
blockFactory
-
estimatedBytes
protected long estimatedBytesThe number of bytes currently estimated with the breaker.
-
-
Constructor Details
-
AbstractVectorBuilder
-
-
Method Details
-
valuesLength
protected abstract int valuesLength()The length of the internal values array. -
growValuesArray
protected abstract void growValuesArray(int newSize) -
elementSize
protected abstract int elementSize()The number of bytes used to represent each value element. -
ensureCapacity
protected final void ensureCapacity() -
adjustBreaker
protected void adjustBreaker(long deltaBytes) -
finish
protected final void finish()Called during implementations ofBlock.Builder.build()as a first step to check if the block is still open and to finish the last position. -
estimatedBytes
public long estimatedBytes()Description copied from interface:Vector.BuilderAn estimate of the number of bytes theVectorcreated byVector.Builder.build()will use. This may overestimate the size but shouldn't underestimate it.- Specified by:
estimatedBytesin interfaceVector.Builder
-
built
protected final void built()Called during implementations ofBlock.Builder.build()as a last step to mark the Builder as closed and make sure that further closes don't double free memory. -
close
public final void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceorg.elasticsearch.core.Releasable
-
extraClose
protected void extraClose()Called when firstclosed. -
isReleased
public boolean isReleased()
-