mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
Multiple fixes for ChronicleEnterprise/Chronicle-Map-Enterprise#42
This commit is contained in:
@@ -37,7 +37,7 @@ public class ReplicatedGlobalMutableState$$Native implements ReplicatedGlobalMut
|
||||
|
||||
@Override
|
||||
public int getAllocatedExtraTierBulks() {
|
||||
return (bs.readInt(offset + 0)) & ((1 << 24) - 1);
|
||||
return (bs.readInt(offset)) & ((1 << 24) - 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -45,7 +45,7 @@ public class ReplicatedGlobalMutableState$$Native implements ReplicatedGlobalMut
|
||||
if (_allocatedExtraTierBulks < 0 || _allocatedExtraTierBulks > 16777215) {
|
||||
throw new IllegalArgumentException("_allocatedExtraTierBulks should be in [0, 16777215] range, " + _allocatedExtraTierBulks + " is given");
|
||||
}
|
||||
bs.writeInt(offset + 0, ((bs.readInt(offset + 0)) & 0xFF000000) | (_allocatedExtraTierBulks));
|
||||
bs.writeInt(offset, ((bs.readInt(offset)) & 0xFF000000) | (_allocatedExtraTierBulks));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -81,9 +81,6 @@ public class ReplicatedGlobalMutableState$$Native implements ReplicatedGlobalMut
|
||||
|
||||
@Override
|
||||
public void setSegmentHeadersOffset(long _segmentHeadersOffset) {
|
||||
if (_segmentHeadersOffset < 0 || _segmentHeadersOffset > 4294967295L) {
|
||||
throw new IllegalArgumentException("_segmentHeadersOffset should be in [0, 4294967295] range, " + _segmentHeadersOffset + " is given");
|
||||
}
|
||||
bs.writeInt(offset + 13, (int) (_segmentHeadersOffset));
|
||||
}
|
||||
|
||||
@@ -188,7 +185,7 @@ public class ReplicatedGlobalMutableState$$Native implements ReplicatedGlobalMut
|
||||
|
||||
@Override
|
||||
public void writeMarshallable(BytesOut bytes) {
|
||||
bytes.writeInt((bs.readInt(offset + 0)) & ((1 << 24) - 1));
|
||||
bytes.writeInt((bs.readInt(offset)) & ((1 << 24) - 1));
|
||||
bytes.writeLong((bs.readLong(offset + 3)) & ((1L << 40) - 1));
|
||||
bytes.writeLong((bs.readLong(offset + 8)) & ((1L << 40) - 1));
|
||||
bytes.writeLong((bs.readInt(offset + 13)) & 0xFFFFFFFFL);
|
||||
@@ -202,7 +199,7 @@ public class ReplicatedGlobalMutableState$$Native implements ReplicatedGlobalMut
|
||||
|
||||
@Override
|
||||
public void readMarshallable(BytesIn bytes) {
|
||||
bs.writeInt(offset + 0, ((bs.readInt(offset + 0)) & 0xFF000000) | (bytes.readInt()));
|
||||
bs.writeInt(offset, ((bs.readInt(offset)) & 0xFF000000) | (bytes.readInt()));
|
||||
bs.writeLong(offset + 3, ((bs.readLong(offset + 3)) & 0xFFFFFF0000000000L) | (bytes.readLong()));
|
||||
bs.writeLong(offset + 8, ((bs.readLong(offset + 8)) & 0xFFFFFF0000000000L) | (bytes.readLong()));
|
||||
bs.writeInt(offset + 13, (int) (bytes.readLong()));
|
||||
|
||||
Reference in New Issue
Block a user