use ThreadLocal to avoid unnecessary kryo instantiations