Package com.netflix.zeno.hash.HashGenericRecordSerializers

Examples of com.netflix.zeno.hash.HashGenericRecordSerializers.Serializer.serialize()


                if (obj.getClass().getComponentType().isPrimitive()) {
                    Serializer serializer = HashGenericRecordSerializers.getPrimitiveArraySerializer(obj.getClass().getComponentType());
                    if (serializer == null) {
                        throw new RuntimeException("Can't find serializer for array of type:" + obj.getClass());
                    }
                    serializer.serialize(hasher, obj);
                } else {
                    Object[] objects = (Object[]) obj;
                    for (Object object : objects) {
                        write(object);
                    }
View Full Code Here


            } else {
                Serializer serializer = HashGenericRecordSerializers.getTypeSerializer(obj.getClass());
                if (serializer == null) {
                    throw new RuntimeException("Can't find serializer for type:" + obj.getClass());
                }
                serializer.serialize(hasher, obj);
            }
        } catch (Exception ex) {
            throw new RuntimeException(ex);
        }
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.