I haven't encountered a customer using a persistent region on a client in
many years. Maybe that entire construct should be deprecated on a
ClientCache.

--
Mike Stolz
Principal Engineer - Gemfire Product Manager
Mobile: 631-835-4771

On Mar 9, 2018 3:39 PM, "Kirk Lund" <kl...@apache.org> wrote:

> And I can't invoke createRegionFactory(RegionShortcut.REPLICATE_
> PERSISTENT)
> because ClientCache throws UnsupportedOperationException for it...
>
>   /**
>    * @since GemFire 6.5
>    */
>   @Override
>   public <K, V> RegionFactory<K, V> createRegionFactory(RegionShortcut
> shortcut) {
>     if (isClient()) {
>       throw new UnsupportedOperationException("operation is not supported
> on a client cache");
>     } else {
>       return new RegionFactoryImpl<>(this, shortcut);
>     }
>   }
>
> ...which means you can only use deprecated code in the client unless you
> don't create a ClientCache.
>
> On Fri, Mar 9, 2018 at 3:32 PM, Kirk Lund <kl...@apache.org> wrote:
>
> > I keep running into things that the dunit tests are doing in a client
> > cache that cannot be done with non-deprecated APIs.
> >
> > Is there a non-deprecated way to create a PERSISTENT_REPLICATE region in
> > a client cache?
> >
> >       AttributesFactory factory = new AttributesFactory();
> >       factory.setDataPolicy(DataPolicy.PERSISTENT_REPLICATE);
> >       factory.setPoolName(pool.getName());
> >       factory.setScope(Scope.DISTRIBUTED_ACK);
> >
> > ...compared to...
> >
> >       ClientRegionFactory crf = clientCacheRule.getClientCache().
> > createClientRegionFactory(ClientRegionShortcut.NOTHING_FITS);
> >       crf.setPoolName(pool.getName());
> >
> >
>

Reply via email to