You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2019/03/01 17:10:00 UTC

[jira] [Commented] (GEODE-5135) Refactor the static method AbstractRegionMap.createCBEvent

    [ https://issues.apache.org/jira/browse/GEODE-5135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16781884#comment-16781884 ] 

ASF subversion and git services commented on GEODE-5135:
--------------------------------------------------------

Commit c19fda5a05c7ce0b064e5def8e65b86804ab76a2 in geode's branch refs/heads/develop from Axel Boldt-Christmas
[ https://gitbox.apache.org/repos/asf?p=geode.git;h=c19fda5 ]

GEODE-5135: Refactor AbstractRegionMap dependencies (#3235)

`BaseRegionMap` will be an abstract base class for `AbstractRegionMap`
and `ProxyRegionMap`. Will move common functionality into this class.
Aims to remove dependency between `AbstractRegionMap` and `ProxyRegionMap`

Move ARMLockTestHook to RegionMap to remove circular dependency
while keeping the impact as small as possible.

Move `forceInvalidateEvent`, `shouldInvokeCallbacks` and
`switchEventOwnerAndOriginRemote` to `BaseRegionMap` to reduce
dependency between `ProxyRegionMap` and `AbstractRegionMap`

Move `createCallbackEvent` from `AbstractRegionMap` to `EntryEventImpl`
This reduces dependecy between `AbstractRegionMap` and `ProxyRegionMap`

Add `EntryEventFactory` class and move `createCallbackEvent`.
Also cleanup `BaseRegionMap` prefix refactoring artifact

Change `EntryEventFactory` to `EntryEventFactoryImpl` that
implements new `EntryEventFactory` interface to make it
availiable for Mockito testing. This requires `createCallbackEvent`
to be a non-static method.

Add private EntryEventFactory field in classes where it is used.
Reduce number of object instantiations.

Co-Authored-By: Patric Lantz <he...@users.noreply.github.com>
Co-Authored-By: Sayyed Ali Kiaian Mousavy <sa...@kth.se>
Co-Authored-By: Nicole Jagelid <ni...@kth.se>
Co-Authored-By: ddahlgren95 <46...@users.noreply.github.com>

> Refactor the static method AbstractRegionMap.createCBEvent
> ----------------------------------------------------------
>
>                 Key: GEODE-5135
>                 URL: https://issues.apache.org/jira/browse/GEODE-5135
>             Project: Geode
>          Issue Type: Improvement
>          Components: transactions
>            Reporter: Darrel Schneider
>            Priority: Major
>              Labels: AbstractRegionMap
>          Time Spent: 2h 50m
>  Remaining Estimate: 0h
>
> AbstractRegionMap.createCBEvent would make more sense as a factory method on EntryEventImpl. Note that ProxyRegionMap currently calls static methods on AbstractRegionMap.
> Since ProxyRegionMap and AbstractRegionMap both implement the RegionMap interface it would be better to either have a common ancestor class for both these classes that contains this common code they share or move this code to methods on the RegionMap interface. It would be nice if ProxyRegionMap did not depend on anything in AbstractRegionMap.
> One idea would be to rename AbstractRegionMap to StorageRegionMap and then have the common ancestor class that both ProxyRegionMap and StorageRegionMap extend by named AbstractRegionMap.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)