Apache Geode
CHANGELOG
Post Processing of Region Data
The PostProcessor interface allows the definition of a callback
that is invoked after any and all client and gfsh operations that get data,
but before the data is returned.
It permits the callback to intervene and format the data
that is to be returned.
The callbacks do not modify the region data,
only the data to be returned.
The processRegionValue method is given the principal of the
operation requester.
The operation will already have been completed,
implying that the principal will have been authorized to complete
the requested operation.
The post processing can therefore format the returned data based
on the identity of the requester (principal).
The processRegionValue method is invoked for these API calls:
Region.getRegion.getAllQuery.executeCqQuery.executeCqQuery.executeWithInitialResultsCqListener.onEvent- for a relevant region event from
CacheListener.afterUpdatefor which there is interest registered withRegion.registerInterest
Care should be taken when designing a system that implements the post processing callback. It incurs the performance penalty of an extra method invocation on every get operation.
Implement Post Processing
Complete these items to implement post processing.
- Define the
security-post-processorproperty. See Enable Security with Property Definitions for details about this property. - Implement the
processRegionValuemethod of thePostProcessorinterface.