[
https://issues.apache.org/jira/browse/IGNITE-638?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14939539#comment-14939539
]
Anton Vinogradov edited comment on IGNITE-638 at 10/1/15 9:30 AM:
------------------------------------------------------------------
Vladisav,
Thanks for your pull request!
I'd like to ask you make some changes before review:
1) Please refactor code according to Ignite Coding Guidelines. See
https://cwiki.apache.org/confluence/display/IGNITE/Coding+Guidelines for
details. I recommend to configure IDEA codestyle.
Important part: According to
https://cwiki.apache.org/confluence/display/IGNITE/Coding+Guidelines#CodingGuidelines-SemanticUnits
To simplify the recognition of semantic units, the every line of the source
code should be separated by one empty line except some cases, see wiki for
details.
Please make sure code contains no redundant newlines.
2) All fields should be marked as final in case they are immutable.
3) Remove @author comments.
4) Use explicit imports only.
5) All annotations must be placed on a separate line, except for @Nullable and
@Override. Please relocate @Override annotations.
6) System.out.println should be replaced with usage of IgniteLogger.
7) Code like "for(int i=0;i<ITEM_COUNT;i++)" should be formatted (extra space
required after each ';' ). Usage of IDEA codestyle will help to do it
automatically.
was (Author: avinogradov):
Vladisav,
Thanks for your pull request!
I'd like to ask you make some changes before review:
1) Please refactor code according to Ignite Coding Guidelines. See
https://cwiki.apache.org/confluence/display/IGNITE/Coding+Guidelines for
details. I recommend to configure IDEA codestyle.
Important part: According to
https://cwiki.apache.org/confluence/display/IGNITE/Coding+Guidelines#CodingGuidelines-SemanticUnits
To simplify the recognition of semantic units, the every line of the source
code should be separated by one empty line except some cases, see wiki for
details.
Please make sure code contains no redundant newlines.
2) All fields should be marked as final in case they are immutable.
3) Remove @author comments.
4) Use explicit imports only.
5) All annotations must be placed on a separate line, except for @Nullable and
@Override. Please relocate @Override annotations.
6) System.out.println should be replaced with usage of IgniteLogger.
7) Code like "for(int i=0;i<ITEM_COUNT;i++)" should be formatted (extra space
required after each ;). Usage of IDEA codestyle will help to do it
automatically.
> Implement IgniteSemaphore data structure
> ----------------------------------------
>
> Key: IGNITE-638
> URL: https://issues.apache.org/jira/browse/IGNITE-638
> Project: Ignite
> Issue Type: Sub-task
> Components: data structures
> Reporter: Dmitriy Setrakyan
> Assignee: Vladisav Jelisavcic
>
> We need to add {{IgniteSemaphore}} data structure in addition to other data
> structures provided by Ignite. {{IgniteSemaphore}} should have similar API to
> {{java.util.concurrent.IgniteSemaphore}} 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 number of
> permits and allow user threads to block whenever no more permits are
> available.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)