@Override public boolean allocateNewSafe() { /* Boolean to keep track if all the memory allocations were successful * Used in the case of composite vectors when we need to allocate multiple * buffers for multiple vectors. If one of the allocations failed we need to * clear all the memory that we allocated */ boolean success = false; try { success = values.allocateNewSafe() && bits.allocateNewSafe(); } finally { if (!success) { clear(); } } bits.zeroVector(); mutator.reset(); accessor.reset(); return success; }
@Override public void allocateNew(int valueCount) { try { values.allocateNew(valueCount); bits.allocateNew(valueCount); } catch(OutOfMemoryException e) { clear(); throw e; } bits.zeroVector(); mutator.reset(); accessor.reset(); }
@Override public void reset() { bits.zeroVector(); mutator.reset(); accessor.reset(); super.reset(); }
@Override public boolean allocateNewSafe() { /* Boolean to keep track if all the memory allocations were successful * Used in the case of composite vectors when we need to allocate multiple * buffers for multiple vectors. If one of the allocations failed we need to * clear all the memory that we allocated */ boolean success = false; try { success = values.allocateNewSafe() && bits.allocateNewSafe(); } finally { if (!success) { clear(); } } bits.zeroVector(); mutator.reset(); accessor.reset(); return success; }
@Override public void allocateNew(int valueCount) { try { values.allocateNew(valueCount); bits.allocateNew(valueCount); } catch(OutOfMemoryException e) { clear(); throw e; } bits.zeroVector(); mutator.reset(); accessor.reset(); }
@Override public void reset() { bits.zeroVector(); mutator.reset(); accessor.reset(); super.reset(); }