/** * Inserts the given object into the current buffer. This method returns a pointer that * can be used to address the written record in this partition, if it is in-memory. The returned * pointers have no expressiveness in the case where the partition is spilled. * * @param record The object to be written to the partition. * @return A pointer to the object in the partition, or <code>-1</code>, if the partition is spilled. * @throws IOException Thrown, when this is a spilled partition and the write failed. */ public final long insertIntoBuildBuffer(BT record) throws IOException { this.buildSideRecordCounter++; if (isInMemory()) { final long pointer = this.buildSideWriteBuffer.getCurrentPointer(); this.buildSideSerializer.serialize(record, this.buildSideWriteBuffer); return isInMemory() ? pointer : -1; } else { this.buildSideSerializer.serialize(record, this.buildSideWriteBuffer); return -1; } }
/** * Inserts the given object into the current buffer. This method returns a pointer that * can be used to address the written record in this partition, if it is in-memory. The returned * pointers have no expressiveness in the case where the partition is spilled. * * @param record The object to be written to the partition. * @return A pointer to the object in the partition, or <code>-1</code>, if the partition is spilled. * @throws IOException Thrown, when this is a spilled partition and the write failed. */ public final long insertIntoBuildBuffer(BT record) throws IOException { this.buildSideRecordCounter++; if (isInMemory()) { final long pointer = this.buildSideWriteBuffer.getCurrentPointer(); this.buildSideSerializer.serialize(record, this.buildSideWriteBuffer); return isInMemory() ? pointer : -1; } else { this.buildSideSerializer.serialize(record, this.buildSideWriteBuffer); return -1; } }
/** * Inserts the given object into the current buffer. This method returns a pointer that * can be used to address the written record in this partition, if it is in-memory. The returned * pointers have no expressiveness in the case where the partition is spilled. * * @param record The object to be written to the partition. * @return A pointer to the object in the partition, or <code>-1</code>, if the partition is spilled. * @throws IOException Thrown, when this is a spilled partition and the write failed. */ public final long insertIntoBuildBuffer(BT record) throws IOException { this.buildSideRecordCounter++; if (isInMemory()) { final long pointer = this.buildSideWriteBuffer.getCurrentPointer(); this.buildSideSerializer.serialize(record, this.buildSideWriteBuffer); return isInMemory() ? pointer : -1; } else { this.buildSideSerializer.serialize(record, this.buildSideWriteBuffer); return -1; } }
/** * Inserts the given object into the current buffer. This method returns a pointer that * can be used to address the written record in this partition, if it is in-memory. The returned * pointers have no expressiveness in the case where the partition is spilled. * * @param record The object to be written to the partition. * @return A pointer to the object in the partition, or <code>-1</code>, if the partition is spilled. * @throws IOException Thrown, when this is a spilled partition and the write failed. */ public final long insertIntoBuildBuffer(BT record) throws IOException { this.buildSideRecordCounter++; if (isInMemory()) { final long pointer = this.buildSideWriteBuffer.getCurrentPointer(); this.buildSideSerializer.serialize(record, this.buildSideWriteBuffer); return isInMemory() ? pointer : -1; } else { this.buildSideSerializer.serialize(record, this.buildSideWriteBuffer); return -1; } }