WebSphere eXtreme Scale V8.6 IBM Extreme Scale

问题描述 投票:0回答:1

我试图弄清楚在ObjectGrid(IBM Extreme Scale)中序列化时我的对象有多大。我想向对象添加更多数据,但想了解它将占用多少空间。有办法确定吗?例如,是否可以在任何对象网格类上调用方法以获取字节?

谢谢

websphere websphere-extreme-scale
1个回答
0
投票
ObjectMap map = session.getMap("map"); map.setValueOutputFormat(OutputFormat.RAW); SerializedValue sv = (SerializedValue) map.get(key); int size = sv.getInputStream().size(); System.out.println("The serialized size of the value for key " + key + " is " + size);
© www.soinside.com 2019 - 2024. All rights reserved.