mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
Honours the maximum capacity set for Bytes, closes https://github.com/OpenHFT/Chronicle-Bytes/issues/141
This commit is contained in:
@@ -659,13 +659,14 @@ public abstract class SegmentStages implements SegmentLock, LocksInterface {
|
||||
|
||||
@Stage("Segment")
|
||||
public Bytes segmentBytesForRead() {
|
||||
segmentBytes.readLimitToCapacity();
|
||||
segmentBytes.readLimit(segmentBS.capacity());
|
||||
return segmentBytes;
|
||||
}
|
||||
|
||||
@Stage("Segment")
|
||||
public Bytes segmentBytesForWrite() {
|
||||
segmentBytes.readPosition(0);
|
||||
segmentBytes.readPosition(0)
|
||||
.readLimit(segmentBS.capacity());
|
||||
return segmentBytes;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user