com.jarvis.cache.serializer.ISerializer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of autoload-cache-serializer-api Show documentation
Show all versions of autoload-cache-serializer-api Show documentation
The serializer module of autoload-cache project
package com.jarvis.cache.serializer;
import com.jarvis.cache.clone.ICloner;
import java.lang.reflect.Type;
/**
*
*/
public interface ISerializer extends ICloner {
/**
* Serialize the given object to binary data.
*
* @param obj object to serialize
* @return the equivalent binary data
* @throws Exception 异常
*/
byte[] serialize(final T obj) throws Exception;
/**
* Deserialize an object from the given binary data.
*
* @param bytes object binary representation
* @param returnType the GenericReturnType of AOP Method
* @return the equivalent object instance, 必须是CacheWrapper类型的
* @throws Exception 异常
*/
T deserialize(final byte[] bytes, final Type returnType) throws Exception;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy