[infinispan-dev] Node being an owner of key

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[infinispan-dev] Node being an owner of key

Vladimir Blagojevic
Hey,

Can we make method getAddress public on DistributionManager? Either that
or add a new method to DistributionManager which returns true if node is
an owner of a key, that is, if key is local and locate(key) returns a
list of addresses where first address equals to this node. It would be
great if we can do this under the lock, just like getLocality, so we can
detect situation where distributed task execution was done during rehash.

I'd prefer to have a new method :-). This is all for 5.0


Let me know,
Vladimir


_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev
Reply | Threaded
Open this post in threaded view
|

Re: [infinispan-dev] Node being an owner of key

Bela Ban


On 3/10/11 7:54 PM, Vladimir Blagojevic wrote:
> Hey,
>
> Can we make method getAddress public on DistributionManager?


Can't you grab RpcManager and call getAddress() on it instead of
DistributionManager ?


> Either that or add a new method to DistributionManager which returns true if node is
> an owner of a key, that is, if key is local and locate(key) returns a
> list of addresses where first address equals to this node.


There's isLocal() but I see it's been deprecated...


--
Bela Ban
Lead JGroups / Clustering Team
JBoss
_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev
Reply | Threaded
Open this post in threaded view
|

Re: [infinispan-dev] Node being an owner of key

Manik Surtani
Yeah, combining getLocality with RpcManager's getAddress won't help you?

On 11 Mar 2011, at 07:22, Bela Ban wrote:

>
>
> On 3/10/11 7:54 PM, Vladimir Blagojevic wrote:
>> Hey,
>>
>> Can we make method getAddress public on DistributionManager?
>
>
> Can't you grab RpcManager and call getAddress() on it instead of
> DistributionManager ?
>
>
>> Either that or add a new method to DistributionManager which returns true if node is
>> an owner of a key, that is, if key is local and locate(key) returns a
>> list of addresses where first address equals to this node.
>
>
> There's isLocal() but I see it's been deprecated...
>
>
> --
> Bela Ban
> Lead JGroups / Clustering Team
> JBoss
> _______________________________________________
> infinispan-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/infinispan-dev

--
Manik Surtani
[hidden email]
twitter.com/maniksurtani

Lead, Infinispan
http://www.infinispan.org




_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev
Reply | Threaded
Open this post in threaded view
|

Re: [infinispan-dev] Node being an owner of key

Vladimir Blagojevic
On 11-03-11 7:45 AM, Manik Surtani wrote:
> Yeah, combining getLocality with RpcManager's getAddress won't help you?
>
> On 11 Mar 2011, at 07:22, Bela Ban wrote:
Yeah, ok I'll do that. Thanks Bela&Manik!
_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev