From 4c04a942f7af71d100b967f3ffc3197de5e22017 Mon Sep 17 00:00:00 2001 From: leventov Date: Thu, 22 Oct 2015 00:18:31 +0300 Subject: [PATCH] Update to the latest chronicle-bom --- pom.xml | 2 +- .../impl/JavaLangBytesReusableBytesStore.java | 29 +++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f07a69ecc..f2c1a4af3 100755 --- a/pom.xml +++ b/pom.xml @@ -46,7 +46,7 @@ net.openhft chronicle-bom pom - 1.8.16-SNAPSHOT + 1.8.17-SNAPSHOT import diff --git a/src/main/java/net/openhft/chronicle/hash/impl/JavaLangBytesReusableBytesStore.java b/src/main/java/net/openhft/chronicle/hash/impl/JavaLangBytesReusableBytesStore.java index 6af60c4e2..54273a235 100644 --- a/src/main/java/net/openhft/chronicle/hash/impl/JavaLangBytesReusableBytesStore.java +++ b/src/main/java/net/openhft/chronicle/hash/impl/JavaLangBytesReusableBytesStore.java @@ -18,6 +18,7 @@ package net.openhft.chronicle.hash.impl; import net.openhft.chronicle.bytes.BytesStore; import net.openhft.chronicle.bytes.RandomDataInput; +import net.openhft.chronicle.core.OS; import net.openhft.lang.io.Bytes; import java.nio.ByteBuffer; @@ -144,6 +145,34 @@ public class JavaLangBytesReusableBytesStore return this; } + @Override + public JavaLangBytesReusableBytesStore writeVolatileByte(long offset, byte i8) { + OS.memory().storeFence(); + bytes.writeByte(offset, i8); + return this; + } + + @Override + public JavaLangBytesReusableBytesStore writeVolatileShort(long offset, short i16) { + OS.memory().storeFence(); + bytes.writeShort(offset, i16); + return this; + } + + @Override + public JavaLangBytesReusableBytesStore writeVolatileInt(long offset, int i32) { + OS.memory().storeFence(); + bytes.writeInt(offset, i32); + return this; + } + + @Override + public JavaLangBytesReusableBytesStore writeVolatileLong(long offset, long i64) { + OS.memory().storeFence(); + bytes.writeLong(offset, i64); + return this; + } + @Override public JavaLangBytesReusableBytesStore write(long offsetInRDO, byte[] bs, int offset, int length) {