/** * {@inheritDoc} */ @Override public String toString() { return String.format("%s{cacheName=%s, entry=%s}", getClass().getName(), getCacheName(), getEntry()); } }
/** * {@inheritDoc} */ @Override public void readExternal(PofReader reader) throws IOException { super.readExternal(reader); }
/** * {@inheritDoc} */ @Override public void writeExternal(DataOutput out) throws IOException { super.writeExternal(out); }
/** * {@inheritDoc} */ @Override public Event transform(Event event) { if (event instanceof DistributableEntryEvent) { DistributableEntryEvent distributableEntryEvent = (DistributableEntryEvent) event; distributableEntryEvent.getEntry().setOriginalBinaryValue(null); return distributableEntryEvent; } else { return event; } } }
/** * Extracts the {@link ClusterMetaInfo} of the {@link Cluster} from where the {@link EntryEvent} originated. * * @param entryEvent The {@link DistributableEntryEvent} from which to determine the {@link ClusterMetaInfo}. * * @return {@link ClusterMetaInfo} */ @SuppressWarnings({"rawtypes"}) private ClusterMetaInfo getSourceClusterMetaInfo(DistributableEntryEvent entryEvent) { Binary binaryValue = entryEvent.getEntry().getBinaryValue(); Map decorations = binaryValue == null ? null : (Map) entryEvent.getEntry().getContext().getInternalValueDecoration(binaryValue, BackingMapManagerContext .DECO_CUSTOM); if (decorations == null) { throw new IllegalStateException("Can't extract the CLUSTER_INFO_DECORATION_KEY from the EntryEvent. The BinaryValue is not decorated"); } ClusterMetaInfo sourceClusterMetaInfo = (ClusterMetaInfo) decorations.get(DistributableEntry.CLUSTER_META_INFO_DECORATION_KEY); if (sourceClusterMetaInfo == null) { throw new IllegalStateException("Expecting a non-null value for CLUSTER_INFO_DECORATION_KEY"); } return sourceClusterMetaInfo; }
/** * {@inheritDoc} */ @Override public boolean evaluate(Object object) { if (object instanceof DistributableEntryEvent) { DistributableEntryEvent e = (DistributableEntryEvent) object; SimpleMapEntry entry = new SimpleMapEntry(e.getEntry().getKey(), e.getEntry().getOriginalValue()); return m_filter.evaluateEntry(entry); } else { return false; } } }
BackingMapManagerContext context = getBackingMapManagerCtx(entryEvent.getCacheName()); entryEvent.getEntry().setContext(context);
/** * {@inheritDoc} */ @Override public void writeExternal(DataOutput out) throws IOException { super.writeExternal(out); }
/** * {@inheritDoc} */ @Override public void readExternal(DataInput in) throws IOException { super.readExternal(in); }
@Override public Event transform(Event event) { if ( event instanceof DistributableEntryEvent) { DistributableEntryEvent distributableEntryEvent = (DistributableEntryEvent) event; NamedCache namedCache = CacheFactory.getCache(distributableEntryEvent.getCacheName()); distributableEntryEvent.getEntry() .setContext(namedCache.getCacheService() .getBackingMapManager() .getContext()); return distributableEntryEvent; } else { return event; } } }).transform(eventList.iterator());
/** * {@inheritDoc} */ @Override public void writeExternal(PofWriter writer) throws IOException { super.writeExternal(writer); } }
/** * {@inheritDoc} */ @Override public void readExternal(DataInput in) throws IOException { super.readExternal(in); }
/** * {@inheritDoc} */ @Override public void writeExternal(PofWriter writer) throws IOException { super.writeExternal(writer); } }
/** * {@inheritDoc} */ @Override public void readExternal(DataInput in) throws IOException { super.readExternal(in); }
namedCache.invoke(entryEvent.getEntry().getBinaryKey(), new EntryEventProcessor(entryEvent, conflictResolverBuilder,
/** * {@inheritDoc} */ @Override public void writeExternal(PofWriter writer) throws IOException { super.writeExternal(writer); } }
/** * {@inheritDoc} */ @Override public void readExternal(PofReader reader) throws IOException { super.readExternal(reader); }
((DistributableEntryEvent) entryEvent).getEntry().setContext(context);