// notify listeners that this entry is about to be passivated
notifier.notifyCacheEntryPassivated(key, entry.getValue(), true,
ImmutableContext.INSTANCE, null);
if (trace) log.tracef("Passivating entry %s", key);
try {
MarshalledEntryImpl marshalledEntry = new MarshalledEntryImpl(entry.getKey(), entry.getValue(),
internalMetadata(entry), marshaller);
persistenceManager.writeToAllStores(marshalledEntry, false);
if (statsEnabled) passivations.getAndIncrement();
} catch (CacheException e) {
log.unableToPassivateEntry(key, e);