}
@Override
public CacheEntry wrapEntryForDelta(InvocationContext ctx, Object deltaKey, Delta delta ) {
CacheEntry cacheEntry = getFromContext(ctx, deltaKey);
DeltaAwareCacheEntry deltaAwareEntry = null;
if (cacheEntry != null) {
deltaAwareEntry = wrapEntryForDelta(ctx, deltaKey, cacheEntry);
} else {
InternalCacheEntry ice = getFromContainer(deltaKey, false);
if (ice != null){
deltaAwareEntry = newDeltaAwareCacheEntry(ctx, deltaKey, (DeltaAware)ice.getValue());
}
}
if (deltaAwareEntry != null)
deltaAwareEntry.appendDelta(delta);
if (trace) {
log.tracef("Wrap %s for delta. Entry=%s", deltaKey, deltaAwareEntry);
}
return deltaAwareEntry;
}