Interface Projection<K,V,R>
- Type Parameters:
K- the type of the keyV- the type of the valueR- the type of the projected result
- All Known Implementing Classes:
IdentityProjection, MultiAttributeProjection, SingleAttributeProjection
public interface Projection<K,V,R>
Interface for extracting subsets of entry data.
Projections allow transforming entries into a different representation,
typically extracting only specific fields or computing derived values from
a read-only snapshot of the entry. Use CacheEntryProcessor for
atomic cache mutations.
Usage example:
Projectioninvalid input: '<'String, Person, String> nameProjection = entry -> entry.getValue().getName(); Listnames = executor.project(nameProjection);
-
Method Summary
-
Method Details
-
transform
Transform a map entry to the projected result.- Parameters:
entry- the detached, immutable entry snapshot to transform; the server provides a read-only snapshot, and direct callers must do the same because invokingMap.Entry.setValue(Object)never updates cache state and is unsupported- Returns:
- the projected result
-