How is maxMemorySize calculated in the presence of backups?

2016-11-11 Thread Josh Cummings
For example, if I have an LruEvictionPolicy on a cache with one backup, and
I say the maxMemorySize is 1G, will it evict when the primary has 1G or
when the primary and the backup together have 1G?

-- 

*JOSH CUMMINGS*

Principal Engineer

[image: Workfront] <https://www.workfront.com/>

*O*  801.477.1234  |  *M*  8015562751

joshcummi...@workfront.com | www.workfront.com
Address <https://www.workfront.com/contact-us/>  |  Twitter
<http://twitter.com/Workfront_Inc>  |  LinkedIn
<http://www.linkedin.com/company/48453>  |  Facebook
<http://www.facebook.com/workfront>

[image: Workfront] <https://www.workfront.com/email-promo>


Re: Getting a cluster-configured JCache CacheManager instance

2016-09-29 Thread Josh Cummings
Here is what I did to satisfy our requirement:

System.setProperty("ignite.zookeeper.host",
resolvePropertyFromCentralizedRepo);
Caching.getCachingProvider(...).getCacheManager(springCfgUrl,
someClassLoader, someProps);

And then use the PropertyPlaceholderConfigurer and a placeholder in the xml
as you suggested.


On Wed, Sep 28, 2016 at 8:32 AM, Josh Cummings <joshcummi...@workfront.com>
wrote:

> Okay, thanks, I'll try that. Along similar lines, is there a way for me to
> bring up an Ignite client, say programmatically, give it a name, and then
> send just the grid name through the JCache API?
>
> Not trying to make Ignite behave just like Hazelcast, but just to make my
> thoughts clear with an example, there I can do this:
>
> Properties properties = new Properties();
> properties.setProperty("hazelcast.instance.name", "my-instance-name");
> Caching.getCachingProvider().getCacheManager(someUri, someClassLoader,
> properties);
>
> And it will pick up a client I've already configured elsewhere in the
> runtime by the name of "my-instance-name".
>
> Is there a way to identify an already configured client through the JCache
> API?
>
> Thanks, again.
>
>
>
> On Tue, Sep 27, 2016 at 4:40 PM, vkulichenko <
> valentin.kuliche...@gmail.com> wrote:
>
>> Hi Josh,
>>
>> Ignite uses Spring for configuration, so you can utilize Spring property
>> placeholder.You can find a nice example here:
>> https://www.mkyong.com/spring/spring-propertyplaceholderconf
>> igurer-example/
>>
>> You can also use one of the shared IP finders provided by Ignite. Shared
>> here means that each node that joins the topology will leave its
>> coordinates
>> in some shared storage, so that other nodes always know where to connect.
>> With this approach you will not have to explicitly specify addresses at
>> all.
>> Here is the list of all available IP finders (only static IP based is not
>> shared): https://apacheignite.readme.io/docs/cluster-config
>>
>> -Val
>>
>>
>>
>> --
>> View this message in context: http://apache-ignite-users.705
>> 18.x6.nabble.com/Getting-a-cluster-configured-JCache-CacheMa
>> nager-instance-tp7970p7978.html
>> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>>
>
>
>
> --
>
> *JOSH CUMMINGS*
>
> Principal Engineer
>
> [image: Workfront] <https://www.workfront.com/>
>
> *O*  801.477.1234  |  *M*  8015562751
>
> joshcummi...@workfront.com | www.workfront.com
> Address <https://www.workfront.com/contact-us/>  |  Twitter
> <http://twitter.com/Workfront_Inc>  |  LinkedIn
> <http://www.linkedin.com/company/48453>  |  Facebook
> <http://www.facebook.com/workfront>
>
> [image: Workfront] <https://www.workfront.com/email-promo>
>



-- 

*JOSH CUMMINGS*

Principal Engineer

[image: Workfront] <https://www.workfront.com/>

*O*  801.477.1234  |  *M*  8015562751

joshcummi...@workfront.com | www.workfront.com
Address <https://www.workfront.com/contact-us/>  |  Twitter
<http://twitter.com/Workfront_Inc>  |  LinkedIn
<http://www.linkedin.com/company/48453>  |  Facebook
<http://www.facebook.com/workfront>

[image: Workfront] <https://www.workfront.com/email-promo>


Re: Getting a cluster-configured JCache CacheManager instance

2016-09-28 Thread Josh Cummings
Okay, thanks, I'll try that. Along similar lines, is there a way for me to
bring up an Ignite client, say programmatically, give it a name, and then
send just the grid name through the JCache API?

Not trying to make Ignite behave just like Hazelcast, but just to make my
thoughts clear with an example, there I can do this:

Properties properties = new Properties();
properties.setProperty("hazelcast.instance.name", "my-instance-name");
Caching.getCachingProvider().getCacheManager(someUri, someClassLoader,
properties);

And it will pick up a client I've already configured elsewhere in the
runtime by the name of "my-instance-name".

Is there a way to identify an already configured client through the JCache
API?

Thanks, again.



On Tue, Sep 27, 2016 at 4:40 PM, vkulichenko <valentin.kuliche...@gmail.com>
wrote:

> Hi Josh,
>
> Ignite uses Spring for configuration, so you can utilize Spring property
> placeholder.You can find a nice example here:
> https://www.mkyong.com/spring/spring-propertyplaceholderconfigurer-
> example/
>
> You can also use one of the shared IP finders provided by Ignite. Shared
> here means that each node that joins the topology will leave its
> coordinates
> in some shared storage, so that other nodes always know where to connect.
> With this approach you will not have to explicitly specify addresses at
> all.
> Here is the list of all available IP finders (only static IP based is not
> shared): https://apacheignite.readme.io/docs/cluster-config
>
> -Val
>
>
>
> --
> View this message in context: http://apache-ignite-users.
> 70518.x6.nabble.com/Getting-a-cluster-configured-JCache-
> CacheManager-instance-tp7970p7978.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>



-- 

*JOSH CUMMINGS*

Principal Engineer

[image: Workfront] <https://www.workfront.com/>

*O*  801.477.1234  |  *M*  8015562751

joshcummi...@workfront.com | www.workfront.com
Address <https://www.workfront.com/contact-us/>  |  Twitter
<http://twitter.com/Workfront_Inc>  |  LinkedIn
<http://www.linkedin.com/company/48453>  |  Facebook
<http://www.facebook.com/workfront>

[image: Workfront] <https://www.workfront.com/email-promo>


Getting a cluster-configured JCache CacheManager instance

2016-09-27 Thread Josh Cummings
I would like to get an instance of a JCache CacheManager that is configured
to point at a remote Ignite cluster.

I understand that I can provide a location to a spring configuration file
with the correct discovery strategy, etc.; however, it appears that in that
strategy I must supply an IP address directly in the file.

All our configuration is housed centrally, so I cannot provide the
IP address directly in the file.

1. What options are there for doing property placeholder resolution in the
XML file?
2. What options are there for combining XML and java config in such a way
that when I call Caching.getCachingProvider(...).getCacheManager(...), I
get a cache that is the result of both XML and java config? (We are also
evaluating Hazelcast and were able to get things working there over JCache
using this approach.)

-- 

*JOSH CUMMINGS*

Principal Engineer

[image: Workfront] <https://www.workfront.com/>

*O*  801.477.1234  |  *M*  8015562751

joshcummi...@workfront.com | www.workfront.com
Address <https://www.workfront.com/contact-us/>  |  Twitter
<http://twitter.com/Workfront_Inc>  |  LinkedIn
<http://www.linkedin.com/company/48453>  |  Facebook
<http://www.facebook.com/workfront>

[image: Workfront] <https://www.workfront.com/email-promo>


Custom (de)serialization for a single field

2016-09-13 Thread Josh Cummings
I have an object I need to cache which has more than 100 fields. One
particular field needs some custom handling when being (de)serialized. I've
considered implementing Binarylizable; however, I don't care to manage all
of the fields via the read and write binary methods.

Where should I look in the api to configure custom (de)serialization for a
single field?

-- 

*JOSH CUMMINGS*

Principal Engineer

[image: Workfront] <https://www.workfront.com/>

*O*  801.477.1234  |  *M*  8015562751

joshcummi...@workfront.com | www.workfront.com
Address <https://www.workfront.com/contact-us/>  |  Twitter
<http://twitter.com/Workfront_Inc>  |  LinkedIn
<http://www.linkedin.com/company/48453>  |  Facebook
<http://www.facebook.com/workfront>

[image: Workfront] <https://www.workfront.com/email-promo>


Dynamic caches over JCache

2016-08-29 Thread Josh Cummings
I am trying to do the following:

CacheManager cm = Caching.getCachingProvider().getCacheManager();
Cache cache = cm.getCache("my-cache");

At this point, cm points to an instance of
org.apache.ignite.cache.CacheManager and cache points to null.

I figured that Ignite would simply create the cache dynamically, but it
appears that CacheManager#getCache calls ignite.cache instead of
ignite.getOrCreateCache.

What is the correct way to use JCache and dynamically create a cache?

-- 

*JOSH CUMMINGS*

Principal Engineer

[image: Workfront] <https://www.workfront.com/>

*O*  801.477.1234  |  *M*  8015562751

joshcummi...@workfront.com | www.workfront.com
Address <https://www.workfront.com/contact-us/>  |  Twitter
<http://twitter.com/Workfront_Inc>  |  LinkedIn
<http://www.linkedin.com/company/48453>  |  Facebook
<http://www.facebook.com/workfront>

[image: Workfront] <https://www.workfront.com/email-promo>