ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agoncha...@apache.org
Subject [20/29] ignite git commit: CacheConfiguration code style fixes.
Date Wed, 26 Apr 2017 09:31:41 GMT
CacheConfiguration code style fixes.


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

Branch: refs/heads/ignite-5024
Commit: 8a5266e787d181dd98aeb3c597ea64e9c39af6ae
Parents: 1dc9e69
Author: sboikov <sboikov@gridgain.com>
Authored: Tue Apr 25 11:42:56 2017 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Tue Apr 25 11:42:56 2017 +0300

----------------------------------------------------------------------
 .../configuration/CacheConfiguration.java       | 57 +++++++++-----------
 1 file changed, 25 insertions(+), 32 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/8a5266e7/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
b/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
index d378343..219e0b1 100644
--- a/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/configuration/CacheConfiguration.java
@@ -143,15 +143,6 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K,
V> {
     /** Default rebalance batch size in bytes. */
     public static final int DFLT_REBALANCE_BATCH_SIZE = 512 * 1024; // 512K
 
-    /** Default maximum eviction queue ratio. */
-    public static final float DFLT_MAX_EVICTION_OVERFLOW_RATIO = 10;
-
-    /** Default synchronous eviction timeout in milliseconds. */
-    public static final long DFLT_EVICT_SYNCHRONIZED_TIMEOUT = 10000;
-
-    /** Default synchronous eviction concurrency level. */
-    public static final int DFLT_EVICT_SYNCHRONIZED_CONCURRENCY_LEVEL = 4;
-
     /** Default value for eager ttl flag. */
     public static final boolean DFLT_EAGER_TTL = true;
 
@@ -290,13 +281,13 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K,
V> {
     private int rebalanceBatchSize = DFLT_REBALANCE_BATCH_SIZE;
 
     /** Rebalance batches prefetch count. */
-    private long rebalanceBatchesPrefetchCount = DFLT_REBALANCE_BATCHES_PREFETCH_COUNT;
+    private long rebalanceBatchesPrefetchCnt = DFLT_REBALANCE_BATCHES_PREFETCH_COUNT;
 
     /** Maximum number of concurrent asynchronous operations. */
     private int maxConcurrentAsyncOps = DFLT_MAX_CONCURRENT_ASYNC_OPS;
 
     /** Maximum inline size for sql indexes. */
-    private int sqlIndexMaxInlineSize = DFLT_SQL_INDEX_MAX_INLINE_SIZE;
+    private int sqlIdxMaxInlineSize = DFLT_SQL_INDEX_MAX_INLINE_SIZE;
 
     /** Write-behind feature. */
     private boolean writeBehindEnabled = DFLT_WRITE_BEHIND_ENABLED;
@@ -374,7 +365,7 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K,
V> {
     private Collection<QueryEntity> qryEntities;
 
     /** Partition loss policy. */
-    private PartitionLossPolicy partitionLossPolicy = DFLT_PARTITION_LOSS_POLICY;
+    private PartitionLossPolicy partLossPlc = DFLT_PARTITION_LOSS_POLICY;
 
     /** */
     private int qryParallelism = DFLT_QUERY_PARALLELISM;
@@ -433,18 +424,18 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K,
V> {
         longQryWarnTimeout = cc.getLongQueryWarningTimeout();
         maxConcurrentAsyncOps = cc.getMaxConcurrentAsyncOperations();
         memPlcName = cc.getMemoryPolicyName();
-        sqlIndexMaxInlineSize = cc.getSqlIndexMaxInlineSize();
+        sqlIdxMaxInlineSize = cc.getSqlIndexMaxInlineSize();
         name = cc.getName();
         nearCfg = cc.getNearConfiguration();
         nodeFilter = cc.getNodeFilter();
         onheapCache = cc.isOnheapCacheEnabled();
-        partitionLossPolicy = cc.getPartitionLossPolicy();
+        partLossPlc = cc.getPartitionLossPolicy();
         pluginCfgs = cc.getPluginConfigurations();
         qryEntities = cc.getQueryEntities() == Collections.<QueryEntity>emptyList()
? null : cc.getQueryEntities();
         qryDetailMetricsSz = cc.getQueryDetailMetricsSize();
         readFromBackup = cc.isReadFromBackup();
         rebalanceBatchSize = cc.getRebalanceBatchSize();
-        rebalanceBatchesPrefetchCount = cc.getRebalanceBatchesPrefetchCount();
+        rebalanceBatchesPrefetchCnt = cc.getRebalanceBatchesPrefetchCount();
         rebalanceDelay = cc.getRebalanceDelay();
         rebalanceMode = cc.getRebalanceMode();
         rebalanceOrder = cc.getRebalanceOrder();
@@ -1088,7 +1079,7 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K,
V> {
      * @return batches count
      */
     public long getRebalanceBatchesPrefetchCount() {
-        return rebalanceBatchesPrefetchCount;
+        return rebalanceBatchesPrefetchCnt;
     }
 
     /**
@@ -1102,7 +1093,7 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K,
V> {
      * @return {@code this} for chaining.
      */
     public CacheConfiguration<K, V> setRebalanceBatchesPrefetchCount(long rebalanceBatchesCnt)
{
-        this.rebalanceBatchesPrefetchCount = rebalanceBatchesCnt;
+        this.rebalanceBatchesPrefetchCnt = rebalanceBatchesCnt;
 
         return this;
     }
@@ -1145,16 +1136,17 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K,
V> {
      * @return Maximum payload size for offheap indexes.
      */
     public int getSqlIndexMaxInlineSize() {
-        return sqlIndexMaxInlineSize;
+        return sqlIdxMaxInlineSize;
     }
 
     /**
      * Sets maximum inline size for sql indexes.
      *
-     * @param sqlIndexMaxInlineSize Maximum inline size for sql indexes.
+     * @param sqlIdxMaxInlineSize Maximum inline size for sql indexes.
+     * @return {@code this} for chaining.
      */
-    public CacheConfiguration<K, V> setSqlIndexMaxInlineSize(int sqlIndexMaxInlineSize)
{
-        this.sqlIndexMaxInlineSize = sqlIndexMaxInlineSize;
+    public CacheConfiguration<K, V> setSqlIndexMaxInlineSize(int sqlIdxMaxInlineSize)
{
+        this.sqlIdxMaxInlineSize = sqlIdxMaxInlineSize;
 
         return this;
     }
@@ -1809,18 +1801,19 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K,
V> {
      * @see PartitionLossPolicy
      */
     public PartitionLossPolicy getPartitionLossPolicy() {
-        return partitionLossPolicy == null ? DFLT_PARTITION_LOSS_POLICY : partitionLossPolicy;
+        return partLossPlc == null ? DFLT_PARTITION_LOSS_POLICY : partLossPlc;
     }
 
     /**
      * Sets partition loss policy. This policy defines how Ignite will react to a situation
when all nodes for
      * some partition leave the cluster.
      *
-     * @param partitionLossPolicy Partition loss policy.
+     * @param partLossPlc Partition loss policy.
+     * @return {@code this} for chaining.
      * @see PartitionLossPolicy
      */
-    public CacheConfiguration<K, V> setPartitionLossPolicy(PartitionLossPolicy partitionLossPolicy)
{
-        this.partitionLossPolicy = partitionLossPolicy;
+    public CacheConfiguration<K, V> setPartitionLossPolicy(PartitionLossPolicy partLossPlc)
{
+        this.partLossPlc = partLossPlc;
 
         return this;
     }
@@ -1991,7 +1984,7 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K,
V> {
         for (ClassProperty prop : desc.props.values())
             entity.addQueryField(prop.fullName(), U.box(prop.type()).getName(), prop.alias());
 
-        entity.setKeyFields(desc.keyProperties);
+        entity.setKeyFields(desc.keyProps);
 
         QueryIndex txtIdx = null;
 
@@ -2261,8 +2254,8 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K,
V> {
     }
 
     /** {@inheritDoc} */
-    @Override public CacheConfiguration<K, V> setTypes(Class<K> keyType, Class<V>
valueType) {
-        super.setTypes(keyType, valueType);
+    @Override public CacheConfiguration<K, V> setTypes(Class<K> keyType, Class<V>
valType) {
+        super.setTypes(keyType, valType);
 
         return this;
     }
@@ -2282,8 +2275,8 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K,
V> {
     }
 
     /** {@inheritDoc} */
-    @Override public CacheConfiguration<K, V> setStoreByValue(boolean isStoreByValue)
{
-        super.setStoreByValue(isStoreByValue);
+    @Override public CacheConfiguration<K, V> setStoreByValue(boolean isStoreByVal)
{
+        super.setStoreByValue(isStoreByVal);
 
         return this;
     }
@@ -2330,7 +2323,7 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K,
V> {
 
         /** */
         @GridToStringInclude
-        private final Set<String> keyProperties = new HashSet<>();
+        private final Set<String> keyProps = new HashSet<>();
 
         /** */
         @GridToStringInclude
@@ -2464,7 +2457,7 @@ public class CacheConfiguration<K, V> extends MutableConfiguration<K,
V> {
             fields.put(name, prop.type());
 
             if (key)
-                keyProperties.add(name);
+                keyProps.add(name);
         }
 
         /**


Mime
View raw message