updated the bom to the latest map

This commit is contained in:
Rob Austin
2017-11-17 15:01:31 +00:00
parent c613a490c5
commit 93a642054e
7 changed files with 19 additions and 15 deletions
@@ -29,6 +29,11 @@ import java.nio.ByteBuffer;
public enum ZeroBytesStore implements BytesStore<ZeroBytesStore, Void> {
INSTANCE;
@Override
public long addressForWrite(long offset) throws UnsupportedOperationException, BufferOverflowException {
throw new UnsupportedOperationException("todo");
}
@Override
public int peekUnsignedByte(long offset) {
return 0;
@@ -123,10 +128,11 @@ public enum ZeroBytesStore implements BytesStore<ZeroBytesStore, Void> {
}
@Override
public long address(long offset) throws UnsupportedOperationException {
public long addressForRead(long offset) throws UnsupportedOperationException {
return offset;
}
@Override
public boolean compareAndSwapInt(long offset, int expected, int value)
throws BufferOverflowException, IllegalArgumentException {
@@ -18,8 +18,6 @@
package net.openhft.chronicle.map.impl.stage.entry;
import net.openhft.chronicle.bytes.Bytes;
import net.openhft.chronicle.bytes.NativeBytesStore;
import net.openhft.chronicle.bytes.RandomDataInput;
import net.openhft.chronicle.hash.Data;
import net.openhft.chronicle.hash.impl.CompactOffHeapLinearHashTable;
import net.openhft.chronicle.hash.impl.stage.entry.AllocatedChunks;
@@ -64,7 +62,7 @@ public abstract class MapEntryStages<K, V> extends HashEntryStages<K>
segmentBytes.writePosition(valueSizeOffset);
mh.m().valueSizeMarshaller.writeSize(segmentBytes, valueSize);
long currentPosition = segmentBytes.writePosition();
long currentAddr = segmentBytes.address(currentPosition);
long currentAddr = segmentBytes.addressForRead(currentPosition);
long skip = alignAddr(currentAddr, mh.m().alignment) - currentAddr;
if (skip > 0)
segmentBytes.writeSkip(skip);