@Override public final int readUnsignedShort() throws IOException { final int v = this.segment.getShort(this.position) & 0xffff; this.position += 2; return v; }
public void reset() { this.bucket = this.originalBucket; this.bucketInSegmentOffset = this.originalBucketInSegmentOffset; this.posInSegment = this.bucketInSegmentOffset + BUCKET_HEADER_LENGTH; this.countInSegment = bucket.getShort(bucketInSegmentOffset + HEADER_COUNT_OFFSET); this.numInSegment = 0; }
@Override public final short readShort() throws IOException { final short v = this.segment.getShort(this.position); this.position += 2; return v; }
public void reset() { this.bucket = this.originalBucket; this.bucketInSegmentOffset = this.originalBucketInSegmentOffset; this.posInSegment = this.bucketInSegmentOffset + BUCKET_HEADER_LENGTH; this.countInSegment = bucket.getShort(bucketInSegmentOffset + HEADER_COUNT_OFFSET); this.numInSegment = 0; }
@Override public final short readShort() throws IOException { final short v = this.segment.getShort(this.position); this.position += 2; return v; }
@Override public final int readUnsignedShort() throws IOException { final int v = this.segment.getShort(this.position) & 0xffff; this.position += 2; return v; }
void set(MemorySegment bucket, MemorySegment[] overflowSegments, HashPartition<BT, PT> partition, int searchHashCode, int bucketInSegmentOffset) { this.bucket = bucket; this.originalBucket = bucket; this.overflowSegments = overflowSegments; this.partition = partition; this.searchHashCode = searchHashCode; this.bucketInSegmentOffset = bucketInSegmentOffset; this.originalBucketInSegmentOffset = bucketInSegmentOffset; this.posInSegment = this.bucketInSegmentOffset + BUCKET_HEADER_LENGTH; this.countInSegment = bucket.getShort(bucketInSegmentOffset + HEADER_COUNT_OFFSET); this.numInSegment = 0; }
void set(MemorySegment bucket, MemorySegment[] overflowSegments, HashPartition<BT, PT> partition, int searchHashCode, int bucketInSegmentOffset) { this.bucket = bucket; this.originalBucket = bucket; this.overflowSegments = overflowSegments; this.partition = partition; this.searchHashCode = searchHashCode; this.bucketInSegmentOffset = bucketInSegmentOffset; this.originalBucketInSegmentOffset = bucketInSegmentOffset; this.posInSegment = this.bucketInSegmentOffset + BUCKET_HEADER_LENGTH; this.countInSegment = bucket.getShort(bucketInSegmentOffset + HEADER_COUNT_OFFSET); this.numInSegment = 0; }
if (seg.getShort(0) != ChannelWriterOutputView.HEADER_MAGIC_NUMBER) { throw new IOException("The current block does not belong to a ChannelWriterOutputView / " + "ChannelReaderInputView: Wrong magic number."); if ( (seg.getShort(ChannelWriterOutputView.HEADER_FLAGS_OFFSET) & ChannelWriterOutputView.FLAG_LAST_BLOCK) != 0) {
if (seg.getShort(0) != ChannelWriterOutputView.HEADER_MAGIC_NUMBER) { throw new IOException("The current block does not belong to a ChannelWriterOutputView / " + "ChannelReaderInputView: Wrong magic number."); if ( (seg.getShort(ChannelWriterOutputView.HEADER_FLAGS_OFFSET) & ChannelWriterOutputView.FLAG_LAST_BLOCK) != 0) {
@Override public short readShort() throws IOException { if (this.positionInSegment < this.limitInSegment - 1) { final short v = this.currentSegment.getShort(this.positionInSegment); this.positionInSegment += 2; return v; } else if (this.positionInSegment == this.limitInSegment) { advance(); return readShort(); } else { return (short) ((readUnsignedByte() << 8) | readUnsignedByte()); } }
@Override public int readUnsignedShort() throws IOException { if (this.positionInSegment < this.limitInSegment - 1) { final int v = this.currentSegment.getShort(this.positionInSegment) & 0xffff; this.positionInSegment += 2; return v; } else if (this.positionInSegment == this.limitInSegment) { advance(); return readUnsignedShort(); } else { return (readUnsignedByte() << 8) | readUnsignedByte(); } }
@Override public short readShort() throws IOException { if (this.positionInSegment < this.limitInSegment - 1) { final short v = this.currentSegment.getShort(this.positionInSegment); this.positionInSegment += 2; return v; } else if (this.positionInSegment == this.limitInSegment) { advance(); return readShort(); } else { return (short) ((readUnsignedByte() << 8) | readUnsignedByte()); } }
@Override public int readUnsignedShort() throws IOException { if (this.positionInSegment < this.limitInSegment - 1) { final int v = this.currentSegment.getShort(this.positionInSegment) & 0xffff; this.positionInSegment += 2; return v; } else if (this.positionInSegment == this.limitInSegment) { advance(); return readUnsignedShort(); } else { return (readUnsignedByte() << 8) | readUnsignedByte(); } }
this.bucket = this.overflowSegments[overflowSegNum]; this.bucketInSegmentOffset = (int) (forwardPointer & 0xffffffff); this.countInSegment = this.bucket.getShort(this.bucketInSegmentOffset + HEADER_COUNT_OFFSET); this.posInSegment = this.bucketInSegmentOffset + BUCKET_HEADER_LENGTH; this.numInSegment = 0;
this.bucket = this.overflowSegments[overflowSegNum]; this.bucketInSegmentOffset = (int) (forwardPointer & 0xffffffff); this.countInSegment = this.bucket.getShort(this.bucketInSegmentOffset + HEADER_COUNT_OFFSET); this.posInSegment = this.bucketInSegmentOffset + BUCKET_HEADER_LENGTH; this.numInSegment = 0;