mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
Merge branch 'master' of github.com:OpenHFT/Chronicle-Map
This commit is contained in:
@@ -28,8 +28,6 @@ import net.openhft.chronicle.hash.serialization.SizeMarshaller;
|
||||
import net.openhft.chronicle.hash.serialization.SizedReader;
|
||||
import net.openhft.chronicle.hash.serialization.impl.SerializationBuilder;
|
||||
import net.openhft.chronicle.map.impl.*;
|
||||
import net.openhft.chronicle.map.impl.CompiledMapIterationContext;
|
||||
import net.openhft.chronicle.map.impl.CompiledMapQueryContext;
|
||||
import net.openhft.chronicle.map.impl.ret.InstanceReturnValue;
|
||||
import net.openhft.chronicle.set.ChronicleSet;
|
||||
import net.openhft.chronicle.wire.WireIn;
|
||||
|
||||
@@ -67,6 +67,11 @@ public enum ZeroBytesStore implements BytesStore<ZeroBytesStore, Void> {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean sharedMemory() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ZeroBytesStore copy() {
|
||||
throw new UnsupportedOperationException();
|
||||
@@ -83,6 +88,13 @@ public enum ZeroBytesStore implements BytesStore<ZeroBytesStore, Void> {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
public void move(long from, long to, long length) {
|
||||
if (length != 0)
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public long address(long offset) throws UnsupportedOperationException {
|
||||
return offset;
|
||||
|
||||
+8
-2
@@ -96,7 +96,7 @@ public final class CharSequenceCustomEncodingBytesWriter
|
||||
|
||||
if (cr.isOverflow()) {
|
||||
outputBuffer.flip();
|
||||
out.write(outputBuffer);
|
||||
writeOutputBuffer(out);
|
||||
outputBuffer.clear();
|
||||
continue;
|
||||
}
|
||||
@@ -108,11 +108,17 @@ public final class CharSequenceCustomEncodingBytesWriter
|
||||
}
|
||||
}
|
||||
outputBuffer.flip();
|
||||
out.write(outputBuffer);
|
||||
writeOutputBuffer(out);
|
||||
|
||||
out.writeInt(encodedSizePos, (int) (out.writePosition() - encodedSizePos - 4));
|
||||
}
|
||||
|
||||
private void writeOutputBuffer(Bytes out) {
|
||||
int remaining = outputBuffer.remaining();
|
||||
out.write(out.writePosition(), outputBuffer, 0, remaining);
|
||||
out.writeSkip(remaining);
|
||||
}
|
||||
|
||||
/**
|
||||
* Need this method because {@link CharBuffer#append(CharSequence, int, int)} produces garbage
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user