ignite-2.0 - Javadoc

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

Branch: refs/heads/ignite-4535
Commit: f4404805fbebaf3907fcc2639e133894dcd24a96
Parents: 88ce993
Author: Alexey Goncharuk <alexey.goncha...@gmail.com>
Authored: Thu Apr 20 11:22:40 2017 +0300
Committer: Alexey Goncharuk <alexey.goncha...@gmail.com>
Committed: Thu Apr 20 11:23:24 2017 +0300

----------------------------------------------------------------------
 .../configuration/MemoryConfiguration.java      | 15 +++++----
 .../MemoryPolicyConfiguration.java              | 32 +++++++++++---------
 2 files changed, 26 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/f4404805/modules/core/src/main/java/org/apache/ignite/configuration/MemoryConfiguration.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/configuration/MemoryConfiguration.java
 
b/modules/core/src/main/java/org/apache/ignite/configuration/MemoryConfiguration.java
index de8fdbf..cd7c1fe 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/configuration/MemoryConfiguration.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/configuration/MemoryConfiguration.java
@@ -171,16 +171,19 @@ public class MemoryConfiguration implements Serializable {
     }
 
     /**
-     * TODO: document
-     * @return Concurrency level.
+     * Returns the number of concurrent segments in Ignite internal page 
mapping tables. By default equals
+     * to the number of available CPUs multiplied by 4.
+     *
+     * @return Mapping table concurrency level.
      */
     public int getConcurrencyLevel() {
         return concLvl;
     }
 
     /**
-     * TODO: document
-     * @param concLvl Concurrency level.
+     * Sets the number of concurrent segments in Ignite internal page mapping 
tables.
+     *
+     * @param concLvl Mapping table oncurrency level.
      */
     public MemoryConfiguration setConcurrencyLevel(int concLvl) {
         this.concLvl = concLvl;
@@ -191,7 +194,7 @@ public class MemoryConfiguration implements Serializable {
     /**
      * Gets a name of default memory policy.
      *
-     * @return A name of a custom memory policy configured with {@link 
MemoryConfiguration} or {@code null} of the
+     * @return A name of a custom memory policy configured with {@code 
MemoryConfiguration} or {@code null} of the
      *         default policy is used.
      */
     public String getDefaultMemoryPolicyName() {
@@ -202,7 +205,7 @@ public class MemoryConfiguration implements Serializable {
      * Sets the name for the default memory policy that will initialize the 
default memory region.
      * To set own default memory policy, create the policy first, pass it to
      * {@link 
MemoryConfiguration#setMemoryPolicies(MemoryPolicyConfiguration...)} method and 
change the name of the
-     * default memory policy with {@link 
MemoryConfiguration#setDefaultMemoryPolicyName(String)}.
+     * default memory policy with {@code 
MemoryConfiguration#setDefaultMemoryPolicyName(String)}.
      *
      * @param dfltMemPlcName Name of a memory policy to be used as default one.
      */

http://git-wip-us.apache.org/repos/asf/ignite/blob/f4404805/modules/core/src/main/java/org/apache/ignite/configuration/MemoryPolicyConfiguration.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/configuration/MemoryPolicyConfiguration.java
 
b/modules/core/src/main/java/org/apache/ignite/configuration/MemoryPolicyConfiguration.java
index 810ecaa..6d5fe8c 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/configuration/MemoryPolicyConfiguration.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/configuration/MemoryPolicyConfiguration.java
@@ -78,16 +78,7 @@ public final class MemoryPolicyConfiguration implements 
Serializable {
      */
     private double evictionThreshold = 0.9;
 
-    /**
-     * TODO: not clear description.
-     *
-     * When {@link #evictionThreshold} is reached, allocation of new data 
pages is prevented by maintaining this
-     * amount of evicted data pages in the pool. If any thread needs free page 
to store cache entry,
-     * it will take empty page from the pool instead of allocating a new one.
-     * Increase this parameter if cache can contain very big entries (total 
size of pages in the pool should be enough
-     * to contain largest cache entry).
-     * Increase this parameter if {@link IgniteOutOfMemoryException} occurred 
with enabled page eviction.
-     */
+    /** Minimum number of empty pages in reuse lists. */
     private int emptyPagesPoolSize = 100;
 
     /**
@@ -121,8 +112,8 @@ public final class MemoryPolicyConfiguration implements 
Serializable {
     }
 
     /**
-     * Sets maximum memory region size defined by this memory policy. The 
total size can not be less than 1 MB (TODO: double check)
-     * due to internal requirements.
+     * Sets maximum memory region size defined by this memory policy. The 
total size should not be less than 10 MB
+     * due to the internal data structures overhead.
      */
     public MemoryPolicyConfiguration setSize(long size) {
         this.size = size;
@@ -196,15 +187,26 @@ public final class MemoryPolicyConfiguration implements 
Serializable {
     }
 
     /**
-     * TODO: document clearly
-     * Gets empty pages pool size.
+     * Specifies the minimal number of empty pages to be present in reuse 
lists for this memory policy.
+     * This parameter ensures that Ignite will be able to successfully evict 
old data entries when the size of
+     * (key, value) pair is slightly larger than page size / 2.
+     * Increase this parameter if cache can contain very big entries (total 
size of pages in this pool should be enough
+     * to contain largest cache entry).
+     * Increase this parameter if {@link IgniteOutOfMemoryException} occurred 
with enabled page eviction.
+     *
+     * @return Minimum number of empty pages in reuse list.
      */
     public int getEmptyPagesPoolSize() {
         return emptyPagesPoolSize;
     }
 
     /**
-     * Sets empty pages pool size.
+     * Specifies the minimal number of empty pages to be present in reuse 
lists for this memory policy.
+     * This parameter ensures that Ignite will be able to successfully evict 
old data entries when the size of
+     * (key, value) pair is slightly larger than page size / 2.
+     * Increase this parameter if cache can contain very big entries (total 
size of pages in this pool should be enough
+     * to contain largest cache entry).
+     * Increase this parameter if {@link IgniteOutOfMemoryException} occurred 
with enabled page eviction.
      *
      * @param emptyPagesPoolSize Empty pages pool size.
      */

Reply via email to