[ 
https://issues.apache.org/jira/browse/GEODE-4944?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Darrel Schneider updated GEODE-4944:
------------------------------------
    Component/s:     (was: regions)

> Combine GemFireCacheImpl read-serialized methods
> ------------------------------------------------
>
>                 Key: GEODE-4944
>                 URL: https://issues.apache.org/jira/browse/GEODE-4944
>             Project: Geode
>          Issue Type: Improvement
>          Components: serialization
>            Reporter: Galen O'Sullivan
>            Priority: Major
>
> Currently, {{InternalCache}} / {{GemFireCacheImpl}} has multiple ways to set 
> a thread-local read-serialized option, with no clear differentiation between 
> them or indication of why a person would choose to use one instead of the 
> other.
> These two methods were added recently, in 4143a73:
> {code}
>   @Override
>   public Boolean getPdxReadSerializedOverride() {
>     TypeRegistry pdxRegistry = this.getPdxRegistry();
>     if (pdxRegistry != null) {
>       return pdxRegistry.getPdxReadSerializedOverride();
>     }
>     return false;
>   }
>   @Override
>   public void setPdxReadSerializedOverride(boolean pdxReadSerialized) {
>     TypeRegistry pdxRegistry = this.getPdxRegistry();
>     if (pdxRegistry != null) {
>       pdxRegistry.setPdxReadSerializedOverride(pdxReadSerialized);
>     }
> {code}
> This has been around for a while, and does something slightly different:
> {code}
>   @Override
>   public void setReadSerializedForCurrentThread(boolean value) {
>     PdxInstanceImpl.setPdxReadSerialized(value);
>     this.setPdxReadSerializedOverride(value);
>   }
> {code}
> Perhaps we could even combine this method if it's obvious what it's doing 
> (though that doesn't need to be a part of this method):
> {code}
>   // test hook
>   @Override
>   public void setReadSerializedForTest(boolean value) {
>     this.cacheConfig.setPdxReadSerialized(value);
>   }
> {code}



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

Reply via email to