ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [45/50] [abbrv] incubator-ignite git commit: sprint-1 - Removed @Nullable return annotation.
Date Mon, 09 Feb 2015 08:55:50 GMT
sprint-1 - Removed @Nullable return annotation.


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

Branch: refs/heads/ignite-181
Commit: 7c31c7207c434e854b198f555e9979223f3016cf
Parents: 33e3b38
Author: Dmitiry Setrakyan <dsetrakyan@gridgain.com>
Authored: Sun Feb 8 16:30:22 2015 -0800
Committer: Dmitiry Setrakyan <dsetrakyan@gridgain.com>
Committed: Sun Feb 8 16:30:22 2015 -0800

----------------------------------------------------------------------
 .../ignite/examples/ignitefs/IgniteFsExample.java  |  6 +++---
 .../main/java/org/apache/ignite/IgniteCache.java   | 11 ++++++-----
 .../main/java/org/apache/ignite/IgniteCluster.java | 17 +++++------------
 .../java/org/apache/ignite/IgniteDataLoader.java   |  2 +-
 .../src/main/java/org/apache/ignite/IgniteFs.java  |  6 +++---
 .../main/java/org/apache/ignite/IgniteLogger.java  |  2 +-
 .../main/java/org/apache/ignite/IgniteQueue.java   | 10 ++++------
 .../java/org/apache/ignite/IgniteServices.java     | 13 +++----------
 .../java/org/apache/ignite/IgniteStreamer.java     |  5 ++---
 .../java/org/apache/ignite/IgniteTransactions.java |  3 +--
 .../apache/ignite/ignitefs/IgniteFsFileSystem.java |  4 ++--
 11 files changed, 31 insertions(+), 48 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7c31c720/examples/src/main/java/org/apache/ignite/examples/ignitefs/IgniteFsExample.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/ignite/examples/ignitefs/IgniteFsExample.java
b/examples/src/main/java/org/apache/ignite/examples/ignitefs/IgniteFsExample.java
index 49aa00f..4615158 100644
--- a/examples/src/main/java/org/apache/ignite/examples/ignitefs/IgniteFsExample.java
+++ b/examples/src/main/java/org/apache/ignite/examples/ignitefs/IgniteFsExample.java
@@ -139,7 +139,7 @@ public final class IgniteFsExample {
      * @param path Directory path.
      * @throws IgniteException In case of error.
      */
-    private static void mkdirs(org.apache.ignite.IgniteFs fs, IgniteFsPath path) throws IgniteException
{
+    private static void mkdirs(IgniteFs fs, IgniteFsPath path) throws IgniteException {
         assert fs != null;
         assert path != null;
 
@@ -166,7 +166,7 @@ public final class IgniteFsExample {
      * @throws IgniteException If file can't be created.
      * @throws IOException If data can't be written.
      */
-    private static void create(org.apache.ignite.IgniteFs fs, IgniteFsPath path, @Nullable
byte[] data)
+    private static void create(IgniteFs fs, IgniteFsPath path, @Nullable byte[] data)
         throws IgniteException, IOException {
         assert fs != null;
         assert path != null;
@@ -195,7 +195,7 @@ public final class IgniteFsExample {
      * @throws IgniteException If file can't be created.
      * @throws IOException If data can't be written.
      */
-    private static void append(org.apache.ignite.IgniteFs fs, IgniteFsPath path, byte[] data)
throws IgniteException, IOException {
+    private static void append(IgniteFs fs, IgniteFsPath path, byte[] data) throws IgniteException,
IOException {
         assert fs != null;
         assert path != null;
         assert data != null;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7c31c720/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 f2a917e..7a18189 100644
--- a/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
@@ -77,7 +77,7 @@ public interface IgniteCache<K, V> extends javax.cache.Cache<K,
V>, IgniteAsyncS
      *
      * @return Random entry, or {@code null} if cache is empty.
      */
-    @Nullable public Entry<K, V> randomEntry();
+    public Entry<K, V> randomEntry();
 
     public IgniteCache<K, V> withExpiryPolicy(ExpiryPolicy plc);
 
@@ -146,13 +146,14 @@ public interface IgniteCache<K, V> extends javax.cache.Cache<K,
V>, IgniteAsyncS
      *
      * @param key Key to store in cache.
      * @param val Value to be associated with the given key.
-     * @return Previously contained value regardless of whether put happened or not.
+     * @return Previously contained value regardless of whether put happened or not ({@code
null} if there was no
+     *      previous value).
      * @throws NullPointerException If either key or value are {@code null}.
      * @throws CacheException If put operation failed.
      * @throws org.apache.ignite.internal.processors.cache.CacheFlagException If projection
flags validation failed.
      */
     @IgniteAsyncSupported
-    @Nullable public V getAndPutIfAbsent(K key, V val) throws CacheException;
+    public V getAndPutIfAbsent(K key, V val) throws CacheException;
 
     /**
      * Creates a {@link Lock} instance associated with passed key.
@@ -237,10 +238,10 @@ public interface IgniteCache<K, V> extends javax.cache.Cache<K,
V>, IgniteAsyncS
      * you can use {@link org.apache.ignite.cache.GridCache#peek(Object, Collection)} method.
      *
      * @param key Entry key.
-     * @return Peeked value.
+     * @return Peeked value, or {@code null} if not found.
      * @throws NullPointerException If key is {@code null}.
      */
-    @Nullable public V localPeek(K key, CachePeekMode... peekModes);
+    public V localPeek(K key, CachePeekMode... peekModes);
 
     /**
      * This method unswaps cache entries by given keys, if any, from swap storage

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7c31c720/modules/core/src/main/java/org/apache/ignite/IgniteCluster.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteCluster.java b/modules/core/src/main/java/org/apache/ignite/IgniteCluster.java
index 800693d..820250e 100644
--- a/modules/core/src/main/java/org/apache/ignite/IgniteCluster.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteCluster.java
@@ -98,7 +98,7 @@ public interface IgniteCluster extends ClusterGroup, IgniteAsyncSupport
{
      *      topology history. Currently only {@link org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi}
      *      supports topology history.
      */
-    @Nullable public Collection<ClusterNode> topology(long topVer) throws UnsupportedOperationException;
+    public Collection<ClusterNode> topology(long topVer) throws UnsupportedOperationException;
 
     /**
      * This method provides ability to detect which cache keys are mapped to which nodes
@@ -144,7 +144,7 @@ public interface IgniteCluster extends ClusterGroup, IgniteAsyncSupport
{
      *      is not present in the grid.
      * @throws IgniteException If failed to map key.
      */
-    @Nullable public <K> ClusterNode mapKeyToNode(@Nullable String cacheName, K key)
throws IgniteException;
+    public <K> ClusterNode mapKeyToNode(@Nullable String cacheName, K key) throws IgniteException;
 
     /**
      * Starts one or more nodes on remote host(s).
@@ -174,11 +174,8 @@ public interface IgniteCluster extends ClusterGroup, IgniteAsyncSupport
{
      * @throws IgniteException In case of error.
      */
     @IgniteAsyncSupported
-    public Collection<GridTuple3<String, Boolean, String>> startNodes(File file,
-        boolean restart,
-        int timeout,
-        int maxConn)
-        throws IgniteException;
+    public Collection<GridTuple3<String, Boolean, String>> startNodes(File file,
boolean restart, int timeout,
+        int maxConn) throws IgniteException;
 
     /**
      * Starts one or more nodes on remote host(s).
@@ -280,11 +277,7 @@ public interface IgniteCluster extends ClusterGroup, IgniteAsyncSupport
{
      */
     @IgniteAsyncSupported
     public Collection<GridTuple3<String, Boolean, String>> startNodes(Collection<Map<String,
Object>> hosts,
-        @Nullable Map<String, Object> dflts,
-        boolean restart,
-        int timeout,
-        int maxConn)
-        throws IgniteException;
+        @Nullable Map<String, Object> dflts, boolean restart, int timeout, int maxConn)
throws IgniteException;
 
     /**
      * Stops nodes satisfying optional set of predicates.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7c31c720/modules/core/src/main/java/org/apache/ignite/IgniteDataLoader.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteDataLoader.java b/modules/core/src/main/java/org/apache/ignite/IgniteDataLoader.java
index e7d1bb9..89fd324 100644
--- a/modules/core/src/main/java/org/apache/ignite/IgniteDataLoader.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteDataLoader.java
@@ -99,7 +99,7 @@ public interface IgniteDataLoader<K, V> extends AutoCloseable {
      *
      * @return Cache name or {@code null} for default cache.
      */
-    @Nullable public String cacheName();
+    public String cacheName();
 
     /**
      * Gets flag value indicating that this data loader assumes that there are no other concurrent
updates to the cache.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7c31c720/modules/core/src/main/java/org/apache/ignite/IgniteFs.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteFs.java b/modules/core/src/main/java/org/apache/ignite/IgniteFs.java
index ac6ab2f..89fb933 100644
--- a/modules/core/src/main/java/org/apache/ignite/IgniteFs.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteFs.java
@@ -64,11 +64,11 @@ public interface IgniteFs extends IgniteFsFileSystem, IgniteAsyncSupport
{
     public static final String PROP_PREFER_LOCAL_WRITES = "locWrite";
 
     /**
-     * Gets GGFS name.
+     * Gets IgniteFS name.
      *
-     * @return GGFS name.
+     * @return IgniteFS name, or {@code null} for default file system.
      */
-    @Nullable public String name();
+    public String name();
 
     /**
      * Gets GGFS configuration.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7c31c720/modules/core/src/main/java/org/apache/ignite/IgniteLogger.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteLogger.java b/modules/core/src/main/java/org/apache/ignite/IgniteLogger.java
index b5a3a10..6aa9183 100644
--- a/modules/core/src/main/java/org/apache/ignite/IgniteLogger.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteLogger.java
@@ -157,5 +157,5 @@ public interface IgniteLogger {
      *
      * @return Name of the file being logged to if one is configured or {@code null} otherwise.
      */
-    @Nullable public String fileName();
+    public String fileName();
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7c31c720/modules/core/src/main/java/org/apache/ignite/IgniteQueue.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteQueue.java b/modules/core/src/main/java/org/apache/ignite/IgniteQueue.java
index 299993a..1103e2c 100644
--- a/modules/core/src/main/java/org/apache/ignite/IgniteQueue.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteQueue.java
@@ -17,8 +17,6 @@
 
 package org.apache.ignite;
 
-import org.jetbrains.annotations.*;
-
 import java.io.*;
 import java.util.*;
 import java.util.concurrent.*;
@@ -124,19 +122,19 @@ public interface IgniteQueue<T> extends BlockingQueue<T>,
Closeable {
     @Override public int size() throws IgniteException;
 
     /** {@inheritDoc} */
-    @Override @Nullable public T poll() throws IgniteException;
+    @Override public T poll() throws IgniteException;
 
     /** {@inheritDoc} */
-    @Override @Nullable public T peek() throws IgniteException;
+    @Override public T peek() throws IgniteException;
 
     /** {@inheritDoc} */
     @Override public void put(T item) throws IgniteException;
 
     /** {@inheritDoc} */
-    @Override @Nullable public T take() throws IgniteException;
+    @Override public T take() throws IgniteException;
 
     /** {@inheritDoc} */
-    @Override @Nullable public T poll(long timeout, TimeUnit unit) throws IgniteException;
+    @Override public T poll(long timeout, TimeUnit unit) throws IgniteException;
 
     /**
      * Removes all of the elements from this queue. Method is used in massive queues with
huge numbers of elements.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7c31c720/modules/core/src/main/java/org/apache/ignite/IgniteServices.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteServices.java b/modules/core/src/main/java/org/apache/ignite/IgniteServices.java
index 02f9639..4df4ccd 100644
--- a/modules/core/src/main/java/org/apache/ignite/IgniteServices.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteServices.java
@@ -20,8 +20,8 @@ package org.apache.ignite;
 import org.apache.ignite.cluster.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.lang.*;
-import org.apache.ignite.services.*;
 import org.apache.ignite.resources.*;
+import org.apache.ignite.services.*;
 import org.jetbrains.annotations.*;
 
 import java.util.*;
@@ -202,10 +202,7 @@ public interface IgniteServices extends IgniteAsyncSupport {
      * @throws IgniteException If failed to deploy service.
      */
     @IgniteAsyncSupported
-    public void deployKeyAffinitySingleton(String name,
-        Service svc,
-        @Nullable String cacheName,
-        Object affKey)
+    public void deployKeyAffinitySingleton(String name, Service svc, @Nullable String cacheName,
Object affKey)
         throws IgniteException;
 
     /**
@@ -241,11 +238,7 @@ public interface IgniteServices extends IgniteAsyncSupport {
      * @throws IgniteException If failed to deploy service.
      */
     @IgniteAsyncSupported
-    public void deployMultiple(String name,
-        Service svc,
-        int totalCnt,
-        int maxPerNodeCnt)
-        throws IgniteException;
+    public void deployMultiple(String name, Service svc, int totalCnt, int maxPerNodeCnt)
throws IgniteException;
 
     /**
      * Deploys multiple instances of the service on the grid according to provided

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7c31c720/modules/core/src/main/java/org/apache/ignite/IgniteStreamer.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteStreamer.java b/modules/core/src/main/java/org/apache/ignite/IgniteStreamer.java
index 5691a62..f7e20cd 100644
--- a/modules/core/src/main/java/org/apache/ignite/IgniteStreamer.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteStreamer.java
@@ -18,7 +18,6 @@
 package org.apache.ignite;
 
 import org.apache.ignite.streamer.*;
-import org.jetbrains.annotations.*;
 
 import java.util.*;
 
@@ -57,9 +56,9 @@ public interface IgniteStreamer {
     /**
      * Gets streamer name.
      *
-     * @return Streamer name.
+     * @return Streamer name, or {@code null} for default no-name streamer.
      */
-    @Nullable public String name();
+    public String name();
 
     /**
      * Submits group of events for processing. This group of events will be processed on
default stage,

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7c31c720/modules/core/src/main/java/org/apache/ignite/IgniteTransactions.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteTransactions.java b/modules/core/src/main/java/org/apache/ignite/IgniteTransactions.java
index 4422d80..550501a 100644
--- a/modules/core/src/main/java/org/apache/ignite/IgniteTransactions.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteTransactions.java
@@ -19,7 +19,6 @@ package org.apache.ignite;
 
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.transactions.*;
-import org.jetbrains.annotations.*;
 
 /**
  * Transactions facade.
@@ -140,7 +139,7 @@ public interface IgniteTransactions {
      * @return Transaction started by this thread or {@code null} if this thread
      *      does not have a transaction.
      */
-    @Nullable public IgniteTx tx();
+    public IgniteTx tx();
 
     /**
      * @return Transaction metrics.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7c31c720/modules/core/src/main/java/org/apache/ignite/ignitefs/IgniteFsFileSystem.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/ignitefs/IgniteFsFileSystem.java
b/modules/core/src/main/java/org/apache/ignite/ignitefs/IgniteFsFileSystem.java
index 967e26b..9e46201 100644
--- a/modules/core/src/main/java/org/apache/ignite/ignitefs/IgniteFsFileSystem.java
+++ b/modules/core/src/main/java/org/apache/ignite/ignitefs/IgniteFsFileSystem.java
@@ -70,7 +70,7 @@ public interface IgniteFsFileSystem {
      * @return File information for specified path or {@code null} if such path does not
exist.
      * @throws IgniteException In case of error.
      */
-    @Nullable public IgniteFsFile update(IgniteFsPath path, Map<String, String> props)
throws IgniteException;
+    public IgniteFsFile update(IgniteFsPath path, Map<String, String> props) throws
IgniteException;
 
     /**
      * Renames/moves a file.
@@ -197,7 +197,7 @@ public interface IgniteFsFileSystem {
      * @return File information for specified path or {@code null} if such path does not
exist.
      * @throws IgniteException In case of error.
      */
-    @Nullable public IgniteFsFile info(IgniteFsPath path) throws IgniteException;
+    public IgniteFsFile info(IgniteFsPath path) throws IgniteException;
 
     /**
      * Gets used space in bytes.


Mime
View raw message