@Override public void setBeanClassLoader(ClassLoader classLoader) { this.serialization = new SerializationDelegate(classLoader); // Need to recreate all Cache instances with new ClassLoader in store-by-value mode... if (isStoreByValue()) { recreateCaches(); } }
private Object deserializeValue(SerializationDelegate serialization, Object storeValue) throws IOException { ByteArrayInputStream in = new ByteArrayInputStream((byte[]) storeValue); try { return serialization.deserialize(in); } finally { in.close(); } }
private Object serializeValue(SerializationDelegate serialization, Object storeValue) throws IOException { ByteArrayOutputStream out = new ByteArrayOutputStream(); try { serialization.serialize(storeValue, out); return out.toByteArray(); } finally { out.close(); } }
private ConcurrentMapCache createCacheWithStoreByValue() { return new ConcurrentMapCache(CACHE_NAME, this.nativeCache, true, new SerializationDelegate(ConcurrentMapCacheTests.class.getClassLoader())); }
private Object deserializeValue(SerializationDelegate serialization, Object storeValue) throws IOException { ByteArrayInputStream in = new ByteArrayInputStream((byte[]) storeValue); try { return serialization.deserialize(in); } finally { in.close(); } }
private Object serializeValue(SerializationDelegate serialization, Object storeValue) throws IOException { ByteArrayOutputStream out = new ByteArrayOutputStream(); try { serialization.serialize(storeValue, out); return out.toByteArray(); } finally { out.close(); } }
@Override public void setBeanClassLoader(ClassLoader classLoader) { this.serialization = new SerializationDelegate(classLoader); // Need to recreate all Cache instances with new ClassLoader in store-by-value mode... if (isStoreByValue()) { recreateCaches(); } }
private Object deserializeValue(SerializationDelegate serialization, Object storeValue) throws IOException { ByteArrayInputStream in = new ByteArrayInputStream((byte[]) storeValue); try { return serialization.deserialize(in); } finally { in.close(); } }
private Object serializeValue(SerializationDelegate serialization, Object storeValue) throws IOException { ByteArrayOutputStream out = new ByteArrayOutputStream(); try { serialization.serialize(storeValue, out); return out.toByteArray(); } finally { out.close(); } }
@Override public void setBeanClassLoader(ClassLoader classLoader) { this.serialization = new SerializationDelegate(classLoader); // Need to recreate all Cache instances with new ClassLoader in store-by-value mode... if (isStoreByValue()) { recreateCaches(); } }