FactoryBuilder.ClassFactory<>(MyClass.class) set cache store attributes

classic Classic list List threaded Threaded
3 messages Options
Paulo Pires Paulo Pires
Reply | Threaded
Open this post in threaded view
|

FactoryBuilder.ClassFactory<>(MyClass.class) set cache store attributes

Hi all,

Following @vkulichenko tip, I'm moving from SingletonFactory to ClassFactory for taking care of my cache stores. Thing is, while the first allows me to pass an instance, the second obviously does not. And it seems there's no way to set any of the cache store attributes I need it to work.

What am I missing?

--
Cheers,
Pires
Paulo Pires Paulo Pires
Reply | Threaded
Open this post in threaded view
|

Re: FactoryBuilder.ClassFactory<>(MyClass.class) set cache store attributes

Implementing Factory did it for me! Thanks @rgilles

On Mon, Dec 7, 2015 at 10:46 AM, Paulo Pires <[hidden email]> wrote:
Hi all,

Following @vkulichenko tip, I'm moving from SingletonFactory to ClassFactory for taking care of my cache stores. Thing is, while the first allows me to pass an instance, the second obviously does not. And it seems there's no way to set any of the cache store attributes I need it to work.

What am I missing?

--
Cheers,
Pires



--
Cheers,
Pires
vkulichenko vkulichenko
Reply | Threaded
Open this post in threaded view
|

Re: FactoryBuilder.ClassFactory<>(MyClass.class) set cache store attributes

Paulo,

You can also take a look at IgniteReflectionFactory class, which is similar to ClassFactory, but allows to provide additional properties. Sound like it can be useful in your case.

-Val