public long address() { return wrapped.address(); }
public long address() { return wrapped.address(); }
public long address() { this.checkNotClosed(); return this.bytes.address(); }
public long address() { this.checkNotClosed(); return this.bytes.address(); }
@NotNull private PointerBytesStore toKey(final @NotNull net.openhft.lang.io.Bytes key, @NotNull final PointerBytesStore pbs) { pbs.set(key.address(), key.capacity()); return pbs; }
@Nullable private BytesStore toValue(final @Nullable net.openhft.lang.io.Bytes value, @NotNull final PointerBytesStore pbs) { if (value == null) return null; pbs.set(value.address(), value.capacity()); return pbs; }
public long toAddress0(long address) { int index = (int) ((address / chunkSize)); long remainder = address - (((long) index) * chunkSize); // index == 0 is the header, so we wont reference count the header if (mappedMemory != null && mappedMemory.index() != 0) mappedFile.release(mappedMemory); try { this.mappedMemory = mappedFile.acquire(index); } catch (IOException e) { throw new RuntimeException(e); } long result = mappedMemory.bytes().address() + remainder; this.offset = result - address; this.last = mask & address; return result; }
public long toAddress0(long address) { int index = (int) ((address / chunkSize)); long remainder = address - (((long) index) * chunkSize); // index == 0 is the header, so we wont reference count the header if (mappedMemory != null && mappedMemory.index() != 0) mappedFile.release(mappedMemory); try { this.mappedMemory = mappedFile.acquire(index); } catch (IOException e) { throw new RuntimeException(e); } long result = mappedMemory.bytes().address() + remainder; this.offset = result - address; this.last = mask & address; return result; }
public void setBytesOffset(Bytes bytes, long offset) { setObjectSerializer(bytes.objectSerializer()); long bytesAddr = bytes.address(); setStartPositionAddress(bytesAddr + offset); capacityAddr = limitAddr = bytesAddr + bytes.capacity(); underlyingBytes = bytes; underlyingOffset = offset; }
public void setBytesOffset(Bytes bytes, long offset) { setObjectSerializer(bytes.objectSerializer()); long bytesAddr = bytes.address(); setStartPositionAddress(bytesAddr + offset); capacityAddr = limitAddr = bytesAddr + bytes.capacity(); underlyingBytes = bytes; underlyingOffset = offset; }