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:
leventov
2015-01-26 13:21:27 +07:00
parent 935c2422dd
commit 68697831b8
51 changed files with 1623 additions and 550 deletions
@@ -138,10 +138,6 @@ final class SerializationBuilder<E> implements Cloneable, Serializable {
} else if (eClass == StringBuilder.class) {
reader((BytesReader<E>) CharSequenceReader.ofStringBuilder());
writer((BytesWriter<E>) CharSequenceWriter.instance());
} else if (eClass == Void.class) {
sizeMarshaller(VoidMarshaller.INSTANCE);
reader((BytesReader<E>) VoidMarshaller.INSTANCE);
interop((BytesInterop<E>) VoidMarshaller.INSTANCE);
} else if (eClass == Long.class) {
sizeMarshaller(LongMarshaller.INSTANCE);
reader((BytesReader<E>) LongMarshaller.INSTANCE);
@@ -176,8 +172,6 @@ final class SerializationBuilder<E> implements Cloneable, Serializable {
boolean possibleOffHeapReferences() {
if (reader instanceof CharSequenceReader)
return false;
if (reader instanceof VoidMarshaller)
return false;
// exclude some known classes, most notably boxed primitive types
if (!instancesAreMutable(eClass))
return false;