You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ag...@apache.org on 2015/12/15 18:16:16 UTC
ignite git commit: #Ignite-1.5 - Javadoc
Repository: ignite
Updated Branches:
refs/heads/ignite-1.5 894992d68 -> 046f3b84f
#Ignite-1.5 - Javadoc
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/046f3b84
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/046f3b84
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/046f3b84
Branch: refs/heads/ignite-1.5
Commit: 046f3b84fd78e36d6dc3130c3200f3e97074515c
Parents: 894992d
Author: Alexey Goncharuk <al...@gmail.com>
Authored: Tue Dec 15 20:16:00 2015 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Tue Dec 15 20:16:00 2015 +0300
----------------------------------------------------------------------
.../src/main/java/org/apache/ignite/Ignite.java | 19 +++++++++++++++++++
.../main/java/org/apache/ignite/IgniteCache.java | 8 +++++++-
2 files changed, 26 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/046f3b84/modules/core/src/main/java/org/apache/ignite/Ignite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/Ignite.java b/modules/core/src/main/java/org/apache/ignite/Ignite.java
index 7196959..5703744 100644
--- a/modules/core/src/main/java/org/apache/ignite/Ignite.java
+++ b/modules/core/src/main/java/org/apache/ignite/Ignite.java
@@ -214,6 +214,9 @@ public interface Ignite extends AutoCloseable {
* <p>
* If local node is an affinity node, this method will return the instance of started cache.
* Otherwise, it will create a client cache on local node.
+ * <p>
+ * If a cache with the same name already exists in the grid, an exception will be thrown regardless
+ * whether the given configuration matches the configuration of the existing cache or not.
*
* @param cacheCfg Cache configuration to use.
* @return Instance of started cache.
@@ -225,6 +228,8 @@ public interface Ignite extends AutoCloseable {
* <p>
* If local node is an affinity node, this method will return the instance of started cache.
* Otherwise, it will create a client cache on local node.
+ * <p>
+ * If a cache with the same name already exists in the grid, an exception will be thrown.
*
* @param cacheName Cache name.
* @return Instance of started cache.
@@ -233,6 +238,10 @@ public interface Ignite extends AutoCloseable {
/**
* Gets existing cache with the given name or creates new one with the given configuration.
+ * <p>
+ * If a cache with the same name already exist, this method will not check that the given
+ * configuration matches the configuration of existing cache and will return an instance
+ * of the existing cache.
*
* @param cacheCfg Cache configuration to use.
* @return Existing or newly created cache.
@@ -259,6 +268,9 @@ public interface Ignite extends AutoCloseable {
* <p>
* If local node is an affinity node, this method will return the instance of started cache.
* Otherwise, it will create a near cache with the given configuration on local node.
+ * <p>
+ * If a cache with the same name already exists in the grid, an exception will be thrown regardless
+ * whether the given configuration matches the configuration of the existing cache or not.
*
* @param cacheCfg Cache configuration to use.
* @param nearCfg Near cache configuration to use on local node in case it is not an
@@ -270,6 +282,13 @@ public interface Ignite extends AutoCloseable {
/**
* Gets existing cache with the given cache configuration or creates one if it does not exist.
+ * <p>
+ * If a cache with the same name already exist, this method will not check that the given
+ * configuration matches the configuration of existing cache and will return an instance
+ * of the existing cache.
+ * <p>
+ * If local node is not an affinity node and a client cache without near cache has been already started
+ * on this node, an exception will be thrown.
*
* @param cacheCfg Cache configuration.
* @param nearCfg Near cache configuration for client.
http://git-wip-us.apache.org/repos/asf/ignite/blob/046f3b84/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 f98d50a..886dca6 100644
--- a/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteCache.java
@@ -557,8 +557,10 @@ public interface IgniteCache<K, V> extends javax.cache.Cache<K, V>, IgniteAsyncS
* the provided key. If an {@link javax.cache.Cache.Entry} does not exist for the specified key,
* an attempt is made to load it (if a loader is configured) or a surrogate
* {@link javax.cache.Cache.Entry}, consisting of the key with a null value is used instead.
- * This method different
* <p>
+ * An instance of entry processor must be stateless as it may be invoked multiple times on primary and
+ * backup nodes in the cache. It is guaranteed that the value passed to the entry processor will be always
+ * the same.
*
* @param key the key to the entry
* @param entryProcessor the {@link CacheEntryProcessor} to invoke
@@ -605,6 +607,10 @@ public interface IgniteCache<K, V> extends javax.cache.Cache<K, V>, IgniteAsyncS
* {@link CacheEntryProcessor} or Caching implementation throw an exception, the
* exception is wrapped and re-thrown when a call to
* {@link javax.cache.processor.EntryProcessorResult#get()} is made.
+ * <p>
+ * An instance of entry processor must be stateless as it may be invoked multiple times on primary and
+ * backup nodes in the cache. It is guaranteed that the value passed to the entry processor will be always
+ * the same.
*
* @param keys the set of keys for entries to process
* @param entryProcessor the {@link CacheEntryProcessor} to invoke