*/
@Override
final public byte[] calculateValueHash(Object value,
CacheConfig config)
{
CacheSerializer serializer = config.getValueSerializer();
TempOutputStream os = null;
try {
os = new TempOutputStream();
Sha256OutputStream mOut = new Sha256OutputStream(os);
DeflaterOutputStream gzOut = new DeflaterOutputStream(mOut);
serializer.serialize(value, gzOut);
gzOut.finish();
mOut.close();
byte[] hash = mOut.getDigest();