Package com.tangosol.util
Interface MapEventTransformer<K,V,U>
-
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
ExtractorEventTransformer,MapEventTransformerFilter,SamplingEventTransformer,SemiLiteEventTransformer
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface MapEventTransformer<K,V,U> extends Serializable
MapEventTransformer interface is used to allow an event consumer to change the content of aMapEventdestined for the correspondingMapListener.In general, the
transformmethod is called after the original MapEvent is evaluated by a Filter (such asMapEventFilter). The values contained by the returned MapEvent object will be the ones given (sent) to the corresponding listener. Returning null will prevent the emission of the event altogether.Note: Currently, the MapEventTransformer interface is supported only by partitioned caches.
- Since:
- Coherence 3.4
- Author:
- gg/jh 2008.05.01
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default <T> MapEventTransformer<K,V,T>andThen(MapEventTransformer<K,U,T> after)Returns a composedMapEventTransformerthat performs, in sequence, this transformation followed by theaftertransformation.MapEvent<K,U>transform(MapEvent<K,V> event)Transform the specified MapEvent.
-
-
-
Method Detail
-
transform
MapEvent<K,U> transform(MapEvent<K,V> event)
Transform the specified MapEvent. The values contained by the returned MapEvent object will be the ones given (sent) to the corresponding listener.- Parameters:
event- the original MapEvent object- Returns:
- modified MapEvent object or null to discard the event
-
andThen
default <T> MapEventTransformer<K,V,T> andThen(MapEventTransformer<K,U,T> after)
Returns a composedMapEventTransformerthat performs, in sequence, this transformation followed by theaftertransformation.If performing either transformation throws an exception, it is relayed to the caller of the composed operation. If performing this transformation throws an exception, the
aftertransformation will not be performed.- Type Parameters:
T- the resulting transformed type T of the after transformer- Parameters:
after- the transformation to perform after this transformation- Returns:
- a composed
MapEventTransformerthat performs in sequence this transformation followed by theaftertransformation
-
-