mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
Moved to CityHash (proven to be faster); Made Hashing and BytesInterop API more cohrent; removed Void marshalling because values should never be null
This commit is contained in:
@@ -20,6 +20,7 @@ package net.openhft.chronicle.hash.serialization;
|
||||
|
||||
import net.openhft.chronicle.hash.ChronicleHash;
|
||||
import net.openhft.lang.io.Bytes;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@@ -63,7 +64,7 @@ public interface BytesWriter<E> extends Serializable {
|
||||
* @param e the object which serialized form length should be returned
|
||||
* @return the length (in bytes) of the serialized form of the given object
|
||||
*/
|
||||
long size(E e);
|
||||
long size(@NotNull E e);
|
||||
|
||||
/**
|
||||
* Serializes the given object to the given {@code bytes}, without writing the length of the
|
||||
@@ -79,5 +80,5 @@ public interface BytesWriter<E> extends Serializable {
|
||||
* @param e the object to serialize to the given bytes
|
||||
* @see BytesReader#read(Bytes, long)
|
||||
*/
|
||||
void write(Bytes bytes, E e);
|
||||
void write(@NotNull Bytes bytes, @NotNull E e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user