All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.base4j.cache.serializer.Serializer Maven / Gradle / Ivy

There is a newer version: 1.3.1
Show newest version
package com.base4j.cache.serializer;

import java.nio.charset.Charset;

/**
 * 缓存序列化接口,允许多种实现
* 目前两种序列化方式:
* 1.StringSerializer
* 2.FstSerializer搭载在Snappy上面实现
* 3.JdkSerializer * 4. */ public interface Serializer { byte[] EMPTY_BYTES = new byte[0]; String EMPTY_STR = ""; Charset UTF_8 = Charset.forName("UTF-8"); /** * Serialize Object */ byte[] serialize(final T value); /** * Deserialize to object */ T deserialize(final byte[] bytes); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy