ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject incubator-ignite git commit: # sprint-1 api cleanup
Date Fri, 06 Feb 2015 06:42:43 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/sprint-1 f55d19833 -> c211c237b


# sprint-1 api cleanup


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/c211c237
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/c211c237
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/c211c237

Branch: refs/heads/sprint-1
Commit: c211c237b2a33a510e3103576e52f76fbfd2900f
Parents: f55d198
Author: sboikov <sboikov@gridgain.com>
Authored: Fri Feb 6 09:42:35 2015 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Fri Feb 6 09:42:35 2015 +0300

----------------------------------------------------------------------
 .../MessagingPingPongListenActorExample.java    |  4 ++--
 .../java/org/apache/ignite/IgniteCache.java     | 22 --------------------
 .../processors/cache/IgniteCacheProxy.java      |  6 ------
 .../ignite/messaging/MessagingListenActor.java  | 18 ++++++++--------
 .../internal/GridListenActorSelfTest.java       | 11 ++++------
 5 files changed, 15 insertions(+), 46 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c211c237/examples/src/main/java/org/apache/ignite/examples/messaging/MessagingPingPongListenActorExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/messaging/MessagingPingPongListenActorExample.java
b/examples/src/main/java/org/apache/ignite/examples/messaging/MessagingPingPongListenActorExample.java
index 6a77efe..b498609 100644
--- a/examples/src/main/java/org/apache/ignite/examples/messaging/MessagingPingPongListenActorExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/messaging/MessagingPingPongListenActorExample.java
@@ -64,7 +64,7 @@ public class MessagingPingPongListenActorExample {
 
             // Set up remote player.
             ignite.message(nodeB).remoteListen(null, new MessagingListenActor<String>()
{
-                @Override public void receive(UUID nodeId, String rcvMsg) throws IgniteCheckedException
{
+                @Override public void receive(UUID nodeId, String rcvMsg) {
                     System.out.println(rcvMsg);
 
                     if ("PING".equals(rcvMsg))
@@ -80,7 +80,7 @@ public class MessagingPingPongListenActorExample {
 
             // Set up local player.
             ignite.message().localListen(null, new MessagingListenActor<String>() {
-                @Override protected void receive(UUID nodeId, String rcvMsg) throws IgniteCheckedException
{
+                @Override protected void receive(UUID nodeId, String rcvMsg) throws IgniteException
{
                     System.out.println(rcvMsg);
 
                     if (cnt.getCount() == 1)

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c211c237/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteCache.java b/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
index bea85dc..73cb87a 100644
--- a/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
@@ -258,28 +258,6 @@ public interface IgniteCache<K, V> extends javax.cache.Cache<K,
V>, IgniteAsyncS
     public void localPromote(Set<? extends K> keys) throws CacheException;
 
     /**
-     * Clears an entry from this cache and swap storage only if the entry
-     * is not currently locked, and is not participating in a transaction.
-     * <p>
-     * If {@link CacheConfiguration#isSwapEnabled()} is set to {@code true} and
-     * {@link org.apache.ignite.internal.processors.cache.CacheFlag#SKIP_SWAP} is not enabled,
the evicted entries will
-     * also be cleared from swap.
-     * <p>
-     * Note that this operation is local as it merely clears
-     * an entry from local cache. It does not remove entries from
-     * remote caches or from underlying persistent storage.
-     * <h2 class="header">Cache Flags</h2>
-     * This method is not available if any of the following flags are set on projection:
-     * {@link org.apache.ignite.internal.processors.cache.CacheFlag#READ}.
-     *
-     * @param keys Keys to clear.
-     * @return {@code True} if entry was successfully cleared from cache, {@code false}
-     *      if entry was in use at the time of this method invocation and could not be
-     *      cleared.
-     */
-    public boolean clear(Collection<? extends K> keys);
-
-    /**
      * Gets the number of all entries cached across all nodes.
      * <p>
      * NOTE: this operation is distributed and will query all participating nodes for their
cache sizes.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c211c237/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
index 959541e..b358f77 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
@@ -296,12 +296,6 @@ public class IgniteCacheProxy<K, V> extends IgniteAsyncSupportAdapter<IgniteCach
     }
 
     /** {@inheritDoc} */
-    @Override public boolean clear(Collection<? extends K> keys) {
-        // TODO IGNITE-1.
-        throw new UnsupportedOperationException();
-    }
-
-    /** {@inheritDoc} */
     @Override public int size(CachePeekMode... peekModes) throws CacheException {
         // TODO IGNITE-1.
         if (peekModes.length != 0)

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c211c237/modules/core/src/main/java/org/apache/ignite/messaging/MessagingListenActor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/messaging/MessagingListenActor.java
b/modules/core/src/main/java/org/apache/ignite/messaging/MessagingListenActor.java
index 0c3083a..292309d 100644
--- a/modules/core/src/main/java/org/apache/ignite/messaging/MessagingListenActor.java
+++ b/modules/core/src/main/java/org/apache/ignite/messaging/MessagingListenActor.java
@@ -130,9 +130,9 @@ public abstract class MessagingListenActor<T> implements IgniteBiPredicate<UUID,
      *
      * @param respMsg Optional response message. If not {@code null} - it will be sent to
the original
      *      sender node.
-     * @throws IgniteCheckedException Thrown in case of any errors.
+     * @throws IgniteException Thrown in case of any errors.
      */
-    protected final void stop(@Nullable Object respMsg) throws IgniteCheckedException {
+    protected final void stop(@Nullable Object respMsg) throws IgniteException {
         keepGoing = false;
 
         send(nodeId, respMsg);
@@ -161,9 +161,9 @@ public abstract class MessagingListenActor<T> implements IgniteBiPredicate<UUID,
      *
      * @param respMsg Optional response message. If not {@code null} - it will be sent to
the original
      *      sender node.
-     * @throws IgniteCheckedException Thrown in case of any errors.
+     * @throws IgniteException Thrown in case of any errors.
      */
-    protected final void respond(@Nullable Object respMsg) throws IgniteCheckedException
{
+    protected final void respond(@Nullable Object respMsg) throws IgniteException {
         checkReversing();
 
         keepGoing = true;
@@ -181,9 +181,9 @@ public abstract class MessagingListenActor<T> implements IgniteBiPredicate<UUID,
      * @param id ID of the node to send the message to, if any.
      * @param respMsg Optional response message. If not {@code null} - it will be sent to
the original
      *      sender node.
-     * @throws IgniteCheckedException Thrown in case of any errors.
+     * @throws IgniteException Thrown in case of any errors.
      */
-    protected final void respond(UUID id, @Nullable Object respMsg) throws IgniteCheckedException
{
+    protected final void respond(UUID id, @Nullable Object respMsg) throws IgniteException
{
         checkReversing();
 
         keepGoing = true;
@@ -205,9 +205,9 @@ public abstract class MessagingListenActor<T> implements IgniteBiPredicate<UUID,
      *
      * @param nodeId ID of the node to send message to.
      * @param respMsg Message to send.
-     * @throws IgniteCheckedException Thrown in case of any errors.
+     * @throws IgniteException Thrown in case of any errors.
      */
-    private void send(UUID nodeId, @Nullable Object respMsg) throws IgniteCheckedException
{
+    private void send(UUID nodeId, @Nullable Object respMsg) throws IgniteException {
         assert nodeId != null;
 
         if (respMsg != null) {
@@ -216,7 +216,7 @@ public abstract class MessagingListenActor<T> implements IgniteBiPredicate<UUID,
             if (node != null)
                 ignite.message(ignite.cluster().forNode(node)).send(null, respMsg); // Can
still fail.
             else
-                throw new IgniteCheckedException("Failed to send message since destination
node has " +
+                throw new IgniteException("Failed to send message since destination node
has " +
                     "left topology (ignoring) [nodeId=" +nodeId + ", respMsg=" + respMsg
+ ']');
         }
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/c211c237/modules/core/src/test/java/org/apache/ignite/internal/GridListenActorSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/GridListenActorSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/GridListenActorSelfTest.java
index 341ce07..4cacd61 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/GridListenActorSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/GridListenActorSelfTest.java
@@ -63,8 +63,7 @@ public class GridListenActorSelfTest extends GridCommonAbstractTest {
         final AtomicInteger cnt = new AtomicInteger(0);
 
         grid().message().localListen(null, new MessagingListenActor<String>() {
-            @Override
-            public void receive(UUID uuid, String rcvMsg) {
+            @Override public void receive(UUID uuid, String rcvMsg) {
                 if ("TEST".equals(rcvMsg)) {
                     cnt.incrementAndGet();
 
@@ -116,7 +115,7 @@ public class GridListenActorSelfTest extends GridCommonAbstractTest {
             final ClusterNode rmt = grid(1).localNode();
 
             grid().message().localListen(null, new MessagingListenActor<String>() {
-                @Override protected void receive(UUID nodeId, String rcvMsg) throws IgniteCheckedException
{
+                @Override protected void receive(UUID nodeId, String rcvMsg) throws IgniteException
{
                     System.out.println("Local node received message: '" + rcvMsg + "'");
 
                     respond(rmt.id(), "RESPONSE");
@@ -159,8 +158,7 @@ public class GridListenActorSelfTest extends GridCommonAbstractTest {
         final CountDownLatch latch = new CountDownLatch(PING_PONG_STEPS);
 
         grid().message().localListen(null, new MessagingListenActor<String>() {
-            @Override
-            protected void receive(UUID nodeId, String rcvMsg) throws IgniteCheckedException
{
+            @Override protected void receive(UUID nodeId, String rcvMsg) {
                 System.out.println("Received message: '" + rcvMsg + "'");
 
                 if ("PING".equals(rcvMsg)) {
@@ -200,8 +198,7 @@ public class GridListenActorSelfTest extends GridCommonAbstractTest {
         final AtomicInteger cnt = new AtomicInteger(0);
 
         grid().message().localListen(null, new MessagingListenActor<String>() {
-            @Override
-            protected void receive(UUID nodeId, String rcvMsg) {
+            @Override protected void receive(UUID nodeId, String rcvMsg) {
                 System.out.println(Thread.currentThread().getName() + "# Received message:
'" + rcvMsg + "'");
 
                 cnt.incrementAndGet();


Mime
View raw message