Skip to content

Commit

Permalink
#ignite-683: Revert renaming replace methods in GridCacheProjectionEx.
Browse files Browse the repository at this point in the history
  • Loading branch information
ivasilinets committed Apr 13, 2015
1 parent b026f2c commit b3d371c
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 21 deletions.
Expand Up @@ -2944,7 +2944,7 @@ public IgniteInternalFuture<Boolean> removeAsync(final K key, @Nullable final Ca
}

/** {@inheritDoc} */
@Override public GridCacheReturn replace(final K key, final V oldVal, final V newVal)
@Override public GridCacheReturn replacex(final K key, final V oldVal, final V newVal)
throws IgniteCheckedException
{
A.notNull(key, "key", oldVal, "oldVal", newVal, "newVal");
Expand Down Expand Up @@ -3006,7 +3006,7 @@ public IgniteInternalFuture<Boolean> removeAsync(final K key, @Nullable final Ca
}

/** {@inheritDoc} */
@Override public IgniteInternalFuture<GridCacheReturn> replaceAsync(final K key, final V oldVal, final V newVal)
@Override public IgniteInternalFuture<GridCacheReturn> replacexAsync(final K key, final V oldVal, final V newVal)
{
A.notNull(key, "key", oldVal, "oldVal", newVal, "newVal");

Expand Down
Expand Up @@ -95,7 +95,7 @@ public IgniteInternalFuture<?> putAllConflictAsync(Map<KeyCacheObject, GridCache
* flag.
* @throws NullPointerException If either key or value are {@code null}.
*/
public IgniteInternalFuture<GridCacheReturn> replaceAsync(K key, V oldVal, V newVal);
public IgniteInternalFuture<GridCacheReturn> replacexAsync(K key, V oldVal, V newVal);

/**
* Stores given key-value pair in cache only if only if the previous value is equal to the
Expand All @@ -116,7 +116,7 @@ public IgniteInternalFuture<?> putAllConflictAsync(Map<KeyCacheObject, GridCache
* @throws NullPointerException If either key or value are {@code null}.
* @throws IgniteCheckedException If replace operation failed.
*/
public GridCacheReturn replace(K key, V oldVal, V newVal) throws IgniteCheckedException;
public GridCacheReturn replacex(K key, V oldVal, V newVal) throws IgniteCheckedException;

/**
* Removes given key mapping from cache if one exists and value is equal to the passed in value.
Expand Down
Expand Up @@ -586,15 +586,15 @@ public boolean deserializePortables() {
}

/** {@inheritDoc} */
@Override public IgniteInternalFuture<GridCacheReturn> replaceAsync(K key, V oldVal, V newVal) {
@Override public IgniteInternalFuture<GridCacheReturn> replacexAsync(K key, V oldVal, V newVal) {
A.notNull(key, "key", oldVal, "oldVal", newVal, "newVal");

return cache.replaceAsync(key, oldVal, newVal);
return cache.replacexAsync(key, oldVal, newVal);
}

/** {@inheritDoc} */
@Override public GridCacheReturn replace(K key, V oldVal, V newVal) throws IgniteCheckedException {
return replaceAsync(key, oldVal, newVal).get();
@Override public GridCacheReturn replacex(K key, V oldVal, V newVal) throws IgniteCheckedException {
return replacexAsync(key, oldVal, newVal).get();
}

/** {@inheritDoc} */
Expand Down
Expand Up @@ -1160,23 +1160,23 @@ public GridCacheProjectionImpl<K, V> gateProjection() {
}

/** {@inheritDoc} */
@Override public IgniteInternalFuture<GridCacheReturn> replaceAsync(K key, V oldVal, V newVal) {
@Override public IgniteInternalFuture<GridCacheReturn> replacexAsync(K key, V oldVal, V newVal) {
GridCacheProjectionImpl<K, V> prev = gate.enter(prj);

try {
return delegate.replaceAsync(key, oldVal, newVal);
return delegate.replacexAsync(key, oldVal, newVal);
}
finally {
gate.leave(prev);
}
}

/** {@inheritDoc} */
@Override public GridCacheReturn replace(K key, V oldVal, V newVal) throws IgniteCheckedException {
@Override public GridCacheReturn replacex(K key, V oldVal, V newVal) throws IgniteCheckedException {
GridCacheProjectionImpl<K, V> prev = gate.enter(prj);

try {
return delegate.replace(key, oldVal, newVal);
return delegate.replacex(key, oldVal, newVal);
}
finally {
gate.leave(prev);
Expand Down
Expand Up @@ -412,8 +412,8 @@ public void near(GridNearAtomicCache<K, V> near) {
}

/** {@inheritDoc} */
@Override public GridCacheReturn replace(K key, V oldVal, V newVal) throws IgniteCheckedException {
return replaceAsync(key, oldVal, newVal).get();
@Override public GridCacheReturn replacex(K key, V oldVal, V newVal) throws IgniteCheckedException {
return replacexAsync(key, oldVal, newVal).get();
}

/** {@inheritDoc} */
Expand All @@ -426,7 +426,7 @@ public void near(GridNearAtomicCache<K, V> near) {

/** {@inheritDoc} */
@SuppressWarnings("unchecked")
@Override public IgniteInternalFuture<GridCacheReturn> replaceAsync(K key, V oldVal, V newVal) {
@Override public IgniteInternalFuture<GridCacheReturn> replacexAsync(K key, V oldVal, V newVal) {
return updateAllAsync0(F.asMap(key, newVal),
null,
null,
Expand Down
Expand Up @@ -465,8 +465,8 @@ public void processDhtAtomicUpdateRequest(
}

/** {@inheritDoc} */
@Override public GridCacheReturn replace(K key, V oldVal, V newVal) throws IgniteCheckedException {
return dht.replace(key, oldVal, newVal);
@Override public GridCacheReturn replacex(K key, V oldVal, V newVal) throws IgniteCheckedException {
return dht.replacex(key, oldVal, newVal);
}

/** {@inheritDoc} */
Expand All @@ -477,8 +477,8 @@ public void processDhtAtomicUpdateRequest(

/** {@inheritDoc} */
@SuppressWarnings("unchecked")
@Override public IgniteInternalFuture<GridCacheReturn> replaceAsync(K key, V oldVal, V newVal) {
return dht.replaceAsync(key, oldVal, newVal);
@Override public IgniteInternalFuture<GridCacheReturn> replacexAsync(K key, V oldVal, V newVal) {
return dht.replacexAsync(key, oldVal, newVal);
}

/** {@inheritDoc} */
Expand Down
Expand Up @@ -211,7 +211,7 @@ public GridLocalAtomicCache(GridCacheContext<K, V> ctx) {

/** {@inheritDoc} */
@SuppressWarnings("unchecked")
@Override public GridCacheReturn replace(K key, V oldVal, V newVal) throws IgniteCheckedException {
@Override public GridCacheReturn replacex(K key, V oldVal, V newVal) throws IgniteCheckedException {
A.notNull(key, "key", oldVal, "oldVal", newVal, "newVal");

return (GridCacheReturn)updateAllInternal(UPDATE,
Expand Down Expand Up @@ -251,7 +251,7 @@ public GridLocalAtomicCache(GridCacheContext<K, V> ctx) {

/** {@inheritDoc} */
@SuppressWarnings("unchecked")
@Override public IgniteInternalFuture<GridCacheReturn> replaceAsync(K key, V oldVal, V newVal) {
@Override public IgniteInternalFuture<GridCacheReturn> replacexAsync(K key, V oldVal, V newVal) {
A.notNull(key, "key", oldVal, "oldVal", newVal, "newVal");

return updateAllAsync0(F.asMap(key, newVal),
Expand Down

0 comments on commit b3d371c

Please sign in to comment.