[
https://issues.apache.org/jira/browse/GEODE-3676?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Lynn Gallinat updated GEODE-3676:
---------------------------------
Description:
Create a new callback called WriteInterceptor to allow a user to change the
value to be written during a write operation.
Use cases:
1) Needing to update an entry when doing write behind caching. For example --
inserting into a DB and needed to add the auto generated id to the domain
object entry.
2) Needing to update an entry when doing inline-caching. Example: needing to
update a PdxInstance on-the-fly.
Requirements:
# This callback should not be invoked while holding locks on the RegionEntry.
# Each Region will only support one instance of WriteInterceptor.
# Callback should be invoked:
#* before CacheWriter
#* before value constraint checks
#* before null checks on a put
#* after CacheLoader
# The WriteInterceptor must be mutable at runtime so that a user can change the
WriteInterceptor on an existing region.
# The WriteInterceptor can be installed or changed via APIs and gfsh commands.
# The WriteInterceptor should be invoked only in the member that initiated the
write operation and should not be invoked at subsequent distribution points.
was:
Create a new callback called WriteInterceptor to allow a user to change the
value to be written during a write operation.
Use cases:
1) Needing to update an entry when doing write behind caching. For example --
inserting into a DB and needed to add the auto generated id to the domain
object entry.
2) Needing to update an entry when doing inline-caching. Example: needing to
update a PdxInstance on-the-fly.
Requirements:
1) This callback should not be invoked while holding locks on the RegionEntry.
2) Each Region will only support one instance of WriteInterceptor.
3) Callback should be invoked:
a) before CacheWriter
b) before value constraint checks
c) before null checks on a put
d) after CacheLoader
4) The WriteInterceptor must be mutable at runtime so that a user can change
the WriteInterceptor on an existing region.
5) The WriteInterceptor can be installed or changed via APIs and gfsh commands.
6) The WriteInterceptor should be invoked only in the member that initiated the
write operation and should not be invoked at subsequent distribution points.
> Add a new callback to modify a value before being put into the cache
> --------------------------------------------------------------------
>
> Key: GEODE-3676
> URL: https://issues.apache.org/jira/browse/GEODE-3676
> Project: Geode
> Issue Type: New Feature
> Components: regions
> Reporter: Fred Krone
> Assignee: Lynn Gallinat
>
> Create a new callback called WriteInterceptor to allow a user to change the
> value to be written during a write operation.
> Use cases:
> 1) Needing to update an entry when doing write behind caching. For example
> -- inserting into a DB and needed to add the auto generated id to the domain
> object entry.
> 2) Needing to update an entry when doing inline-caching. Example: needing to
> update a PdxInstance on-the-fly.
> Requirements:
> # This callback should not be invoked while holding locks on the RegionEntry.
> # Each Region will only support one instance of WriteInterceptor.
> # Callback should be invoked:
> #* before CacheWriter
> #* before value constraint checks
> #* before null checks on a put
> #* after CacheLoader
> # The WriteInterceptor must be mutable at runtime so that a user can change
> the WriteInterceptor on an existing region.
> # The WriteInterceptor can be installed or changed via APIs and gfsh commands.
> # The WriteInterceptor should be invoked only in the member that initiated
> the write operation and should not be invoked at subsequent distribution
> points.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)