[ 
https://issues.apache.org/jira/browse/IGNITE-642?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15192328#comment-15192328
 ] 

Vladisav Jelisavcic commented on IGNITE-642:
--------------------------------------------

Yakov, 

thanks for the comments.

1. I'm still a bit confused about this; when i do as Anton recommended, I also 
get a whole bunch of other changes that do not relate to IgniteLock at all. Are 
you sure it belongs to this PR? For now, I've changed it manually and 
everything works well in my local environment.
2. and 3. I agree: that's weird. Fixed now.
4. I admit it was a bit sloppy on my side; Should be better now.
5. rename to IgniteLock - done. I propose to leave the name of 
Ignite#reentrantLock() method in order to reduce confusion for the new users 
(if I'm not wrong, there are several other lock methods throughout the API?), 
what do you say? (in either case, it should be really easy to refactor)
 rename SDK lock interface - done.
 use getOrCreate() over newCondition() - done.
 IgniteCondition should extend Condition - done.
6. Actually, failedNodes shrinks on every update - but nevertheless, you are 
right; kernalContext.discovery().node(id) does the same thing (only far more 
readable). Fixed & tested.

I also added fix from IGNITE-2735 and done some minor refactoring.

Please let me know if you have additional comments/suggestions.

> Implement IgniteReentrantLock data structure
> --------------------------------------------
>
>                 Key: IGNITE-642
>                 URL: https://issues.apache.org/jira/browse/IGNITE-642
>             Project: Ignite
>          Issue Type: Sub-task
>          Components: data structures
>            Reporter: Dmitriy Setrakyan
>            Assignee: Vladisav Jelisavcic
>
> We need to add {{IgniteReentrantLock}} data structure in addition to other 
> data structures provided by Ignite. {{IgniteReentrantLock}} should have 
> similar API to {{java.util.concurrent.locks.ReentrantLock}} class in JDK.
> As an example, you can see how 
> [IgniteCountDownLatch|https://github.com/apache/incubator-ignite/blob/master/modules/core/src/main/java/org/apache/ignite/IgniteCountDownLatch.java]
>  is implemented in 
> [GridCacheCountDownLatchImpl|https://github.com/apache/incubator-ignite/blob/master/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheCountDownLatchImpl.java]
>  class.
> In general we need to have an entity in ATOMIC cache storing lock-owner 
> identifier together with a queue of waiters.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to