
com.nedap.archie.util.KryoUtil Maven / Gradle / Ivy
package com.nedap.archie.util;
import com.esotericsoftware.kryo.kryo5.Kryo;
import com.esotericsoftware.kryo.kryo5.util.Pool;
/**
* Created by pieter.bos on 03/11/15.
*/
public class KryoUtil {
// Build pool with SoftReferences enabled (optional)
private static Pool pool;
static {
// Pool constructor arguments: thread safe, soft references, maximum capacity
pool = new Pool(true, false) {
protected Kryo create () {
Kryo kryo = new Kryo();
kryo.setRegistrationRequired(false);
kryo.setReferences(true);
kryo.setCopyReferences(true);
return kryo;
}
};
}
public static Pool getPool() {
return pool;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy