mirror of
https://github.com/chillzhuang/blade-tool
synced 2025-03-14 01:27:25 +08:00
✨ 代码优化
This commit is contained in:
parent
044b6f61dc
commit
37c2563326
@ -34,11 +34,11 @@ public class ProtostuffUtil {
|
|||||||
/**
|
/**
|
||||||
* 避免每次序列化都重新申请Buffer空间
|
* 避免每次序列化都重新申请Buffer空间
|
||||||
*/
|
*/
|
||||||
private static LinkedBuffer buffer = LinkedBuffer.allocate(LinkedBuffer.DEFAULT_BUFFER_SIZE);
|
private static final LinkedBuffer buffer = LinkedBuffer.allocate(LinkedBuffer.DEFAULT_BUFFER_SIZE);
|
||||||
/**
|
/**
|
||||||
* 缓存Schema
|
* 缓存Schema
|
||||||
*/
|
*/
|
||||||
private static Map<Class<?>, Schema<?>> schemaCache = new ConcurrentHashMap<>();
|
private static final Map<Class<?>, Schema<?>> schemaCache = new ConcurrentHashMap<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 序列化方法,把指定对象序列化成字节数组
|
* 序列化方法,把指定对象序列化成字节数组
|
||||||
|
Loading…
x
Reference in New Issue
Block a user