Skip to content

Commit

Permalink
# IGNITE-167 Made javadocs more informative.
Browse files Browse the repository at this point in the history
  • Loading branch information
akuznetsov-gridgain committed Feb 5, 2015
1 parent fc248df commit 5dce207
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Expand Up @@ -54,10 +54,10 @@ public enum GridRestCommand {
/** Replace cache value only if there is currently a mapping for it. */ /** Replace cache value only if there is currently a mapping for it. */
CACHE_REPLACE("rep"), CACHE_REPLACE("rep"),


/** Increment. */ /** Increment of atomic long cache data structure. */
CACHE_INCREMENT("incr"), CACHE_INCREMENT("incr"),


/** Decrement. */ /** Decrement of atomic long cache data structure. */
CACHE_DECREMENT("decr"), CACHE_DECREMENT("decr"),


/** Compare and set. */ /** Compare and set. */
Expand Down
Expand Up @@ -410,19 +410,19 @@ private IgniteInternalFuture<GridRestResponse> executeCommand(
} }


/** /**
* Handles increment and decrement commands. * Handles increment and decrement commands for cache atomic long data structures.
* *
* @param cache Cache. * @param cache Cache.
* @param key Key. * @param name Name of cache atomic long.
* @param req Request. * @param req Request.
* @param decr Whether to decrement (increment otherwise). * @param decr Whether to decrement (increment otherwise).
* @return Future of operation result. * @return Future of operation result.
* @throws IgniteCheckedException In case of error. * @throws IgniteCheckedException In case of error.
*/ */
private static IgniteInternalFuture<?> incrementOrDecrement(CacheProjection<Object, Object> cache, String key, private static IgniteInternalFuture<?> incrementOrDecrement(CacheProjection<Object, Object> cache, String name,
GridRestCacheRequest req, final boolean decr) throws IgniteCheckedException { GridRestCacheRequest req, final boolean decr) throws IgniteCheckedException {
assert cache != null; assert cache != null;
assert key != null; assert name != null;
assert req != null; assert req != null;


Long init = req.initial(); Long init = req.initial();
Expand All @@ -431,7 +431,7 @@ private static IgniteInternalFuture<?> incrementOrDecrement(CacheProjection<Obje
if (delta == null) if (delta == null)
throw new IgniteCheckedException(GridRestCommandHandlerAdapter.missingParameter("delta")); throw new IgniteCheckedException(GridRestCommandHandlerAdapter.missingParameter("delta"));


final CacheAtomicLong l = cache.cache().dataStructures().atomicLong(key, init != null ? init : 0, true); final CacheAtomicLong l = cache.cache().dataStructures().atomicLong(name, init != null ? init : 0, true);


final Long d = delta; final Long d = delta;


Expand Down

0 comments on commit 5dce207

Please sign in to comment.