}
public static <K, V> void writeToAllStores(K key, V value, Cache<K, V> cache) {
AdvancedCache<K, V> advCache = cache.getAdvancedCache();
PersistenceManager pm = advCache.getComponentRegistry().getComponent(PersistenceManager.class);
StreamingMarshaller marshaller = advCache.getComponentRegistry().getCacheMarshaller();
pm.writeToAllStores(new MarshalledEntryImpl(key, value, null, marshaller), false);
}