org.apache.oozie.util
Class FixedJsonInstanceSerializer<T>
java.lang.Object
org.apache.oozie.util.FixedJsonInstanceSerializer<T>
- All Implemented Interfaces:
- org.apache.curator.x.discovery.details.InstanceSerializer<T>
public class FixedJsonInstanceSerializer<T>
- extends Object
- implements org.apache.curator.x.discovery.details.InstanceSerializer<T>
|
Method Summary |
org.apache.curator.x.discovery.ServiceInstance<T> |
deserialize(byte[] pBytes)
|
byte[] |
serialize(org.apache.curator.x.discovery.ServiceInstance<T> pInstance)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FixedJsonInstanceSerializer
public FixedJsonInstanceSerializer(Class<T> payloadClass)
- Parameters:
payloadClass - used to validate payloads when deserializing
FixedJsonInstanceSerializer
public FixedJsonInstanceSerializer(Class<T> pPayloadClass,
org.codehaus.jackson.map.ObjectMapper pMapper)
serialize
public byte[] serialize(org.apache.curator.x.discovery.ServiceInstance<T> pInstance)
throws Exception
- Specified by:
serialize in interface org.apache.curator.x.discovery.details.InstanceSerializer<T>
- Throws:
Exception
deserialize
public org.apache.curator.x.discovery.ServiceInstance<T> deserialize(byte[] pBytes)
throws Exception
- Specified by:
deserialize in interface org.apache.curator.x.discovery.details.InstanceSerializer<T>
- Throws:
Exception
Copyright © 2015 Apache Software Foundation. All Rights Reserved.