Darrel Schneider created GEODE-6704:
---------------------------------------

             Summary: AbstractRegion.allGatewaySenderIds can be improved
                 Key: GEODE-6704
                 URL: https://issues.apache.org/jira/browse/GEODE-6704
             Project: Geode
          Issue Type: Improvement
          Components: core
            Reporter: Darrel Schneider


Two things I noticed about AbstractRegion.allGatewaySenderIds that can be 
easily improved:
 # It is currently implemented with CopyOnWriteArraySet but is never modified 
in place and is searched. These searches end up doing a linear search since the 
underlying impl is an ArrayList.
 # The gettor method for allGatewaySenderIds always creates an unmodifiable 
wrapper. This is just garbage since the set is never modified. 

A prototype fix is in: 9d978c615d4e6ccfc3d1ab731cf2e76bb59d1fec
The settor method now uses a HashSet and makes sure that it is always wrapped 
in an unmodifiable wrapper. This allows the gettor to just return the reference.



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

Reply via email to