ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agoncha...@apache.org
Subject [42/50] incubator-ignite git commit: GG-9830 Cleanup code.
Date Tue, 28 Apr 2015 22:51:22 GMT
GG-9830 Cleanup code.


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

Branch: refs/heads/ignite-80
Commit: 576c88834cbe2dfd444e12f0ab345aa75d1cc9ad
Parents: 7e0a19d
Author: AKuznetsov <akuznetsov@gridgain.com>
Authored: Tue Apr 28 21:05:56 2015 +0700
Committer: AKuznetsov <akuznetsov@gridgain.com>
Committed: Tue Apr 28 21:05:56 2015 +0700

----------------------------------------------------------------------
 .../visor/cache/VisorCacheConfiguration.java    |   7 -
 .../cache/VisorCacheStoreConfiguration.java     |  35 -----
 .../cache/VisorCacheTypeFieldMetadata.java      |  36 +-----
 .../visor/cache/VisorCacheTypeMetadata.java     |  99 ++------------
 .../internal/visor/igfs/VisorIgfsMetrics.java   | 128 +++----------------
 5 files changed, 30 insertions(+), 275 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/576c8883/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfiguration.java
b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfiguration.java
index d070872..4097c4f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheConfiguration.java
@@ -250,13 +250,6 @@ public class VisorCacheConfiguration implements Serializable {
     }
 
     /**
-     * @param memoryMode New memory mode.
-     */
-    public void memoryMode(CacheMemoryMode memoryMode) {
-        this.memoryMode = memoryMode;
-    }
-
-    /**
      * @return Cache interceptor.
      */
     @Nullable public String interceptor() {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/576c8883/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheStoreConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheStoreConfiguration.java
b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheStoreConfiguration.java
index a4a2235..06dbfbf 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheStoreConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheStoreConfiguration.java
@@ -146,13 +146,6 @@ public class VisorCacheStoreConfiguration implements Serializable {
     }
 
     /**
-     * @param writeBehindEnabled New flag indicating whether write-behind behaviour should
be used for the cache store.
-     */
-    public void writeBehindEnabled(boolean writeBehindEnabled) {
-        this.writeBehindEnabled = writeBehindEnabled;
-    }
-
-    /**
      * @return Maximum batch size for write-behind cache store operations.
      */
     public int batchSize() {
@@ -160,13 +153,6 @@ public class VisorCacheStoreConfiguration implements Serializable {
     }
 
     /**
-     * @param batchSz New maximum batch size for write-behind cache store operations.
-     */
-    public void batchSize(int batchSz) {
-        this.batchSz = batchSz;
-    }
-
-    /**
      * @return Frequency with which write-behind cache is flushed to the cache store in milliseconds.
      */
     public long flushFrequency() {
@@ -174,13 +160,6 @@ public class VisorCacheStoreConfiguration implements Serializable {
     }
 
     /**
-     * @param flushFreq New frequency with which write-behind cache is flushed to the cache
store in milliseconds.
-     */
-    public void flushFrequency(long flushFreq) {
-        this.flushFreq = flushFreq;
-    }
-
-    /**
      * @return Maximum object count in write-behind cache.
      */
     public int flushSize() {
@@ -188,26 +167,12 @@ public class VisorCacheStoreConfiguration implements Serializable {
     }
 
     /**
-     * @param flushSz New maximum object count in write-behind cache.
-     */
-    public void flushSize(int flushSz) {
-        this.flushSz = flushSz;
-    }
-
-    /**
      * @return Number of threads that will perform cache flushing.
      */
     public int flushThreadCount() {
         return flushThreadCnt;
     }
 
-    /**
-     * @param flushThreadCnt New number of threads that will perform cache flushing.
-     */
-    public void flushThreadCount(int flushThreadCnt) {
-        this.flushThreadCnt = flushThreadCnt;
-    }
-
     /** {@inheritDoc} */
     @Override public String toString() {
         return S.toString(VisorCacheStoreConfiguration.class, this);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/576c8883/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheTypeFieldMetadata.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheTypeFieldMetadata.java
b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheTypeFieldMetadata.java
index 7aabf63..17e8f09 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheTypeFieldMetadata.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheTypeFieldMetadata.java
@@ -48,22 +48,15 @@ public class VisorCacheTypeFieldMetadata implements Serializable {
     public static VisorCacheTypeFieldMetadata from(CacheTypeFieldMetadata f) {
         VisorCacheTypeFieldMetadata fieldMetadata = new VisorCacheTypeFieldMetadata();
 
-        fieldMetadata.dbName(f.getDatabaseName());
-        fieldMetadata.dbType(f.getDatabaseType());
-        fieldMetadata.javaName(f.getJavaName());
-        fieldMetadata.javaType(U.compact(f.getJavaType().getName()));
+        fieldMetadata.dbName = f.getDatabaseName();
+        fieldMetadata.dbType = f.getDatabaseType();
+        fieldMetadata.javaName = f.getJavaName();
+        fieldMetadata.javaType = U.compact(f.getJavaType().getName());
 
         return fieldMetadata;
     }
 
     /**
-     * @param dbName New column name in database.
-     */
-    public void dbName(String dbName) {
-        this.dbName = dbName;
-    }
-
-    /**
      * @return Column name in database.
      */
     public String dbName() {
@@ -71,13 +64,6 @@ public class VisorCacheTypeFieldMetadata implements Serializable {
     }
 
     /**
-     * @param dbType New column JDBC type in database.
-     */
-    public void dbType(int dbType) {
-        this.dbType = dbType;
-    }
-
-    /**
      * @return Column JDBC type in database.
      */
     public int dbType() {
@@ -85,13 +71,6 @@ public class VisorCacheTypeFieldMetadata implements Serializable {
     }
 
     /**
-     * @param javaName New field name in java object.
-     */
-    public void javaName(String javaName) {
-        this.javaName = javaName;
-    }
-
-    /**
      * @return Field name in java object.
      */
     public String javaName() {
@@ -99,13 +78,6 @@ public class VisorCacheTypeFieldMetadata implements Serializable {
     }
 
     /**
-     * @param javaType New corresponding java type.
-     */
-    public void javaType(String javaType) {
-        this.javaType = javaType;
-    }
-
-    /**
      * @return Corresponding java type.
      */
     public String javaType() {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/576c8883/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheTypeMetadata.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheTypeMetadata.java
b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheTypeMetadata.java
index 96e5627..713b98a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheTypeMetadata.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/cache/VisorCacheTypeMetadata.java
@@ -97,30 +97,30 @@ public class VisorCacheTypeMetadata implements Serializable {
 
         VisorCacheTypeMetadata metadata = new VisorCacheTypeMetadata();
 
-        metadata.dbSchema(m.getDatabaseSchema());
-        metadata.dbTbl(m.getDatabaseTable());
-        metadata.keyType(m.getKeyType());
-        metadata.valType(m.getValueType());
+        metadata.dbSchema = m.getDatabaseSchema();
+        metadata.dbTbl = m.getDatabaseTable();
+        metadata.keyType = m.getKeyType();
+        metadata.valType = m.getValueType();
 
         ArrayList<VisorCacheTypeFieldMetadata> fields = new ArrayList<>(m.getKeyFields().size());
 
         for (CacheTypeFieldMetadata field : m.getKeyFields())
             fields.add(VisorCacheTypeFieldMetadata.from(field));
 
-        metadata.keyFields(fields);
+        metadata.keyFields = fields;
 
         fields = new ArrayList<>(m.getValueFields().size());
 
         for (CacheTypeFieldMetadata field : m.getValueFields())
             fields.add(VisorCacheTypeFieldMetadata.from(field));
 
-        metadata.valFields(fields);
+        metadata.valFields = fields;
 
-        metadata.qryFlds(convertFieldsMap(m.getQueryFields()));
-        metadata.ascFlds(convertFieldsMap(m.getAscendingFields()));
-        metadata.descFlds(convertFieldsMap(m.getDescendingFields()));
-        metadata.txtFlds(m.getTextFields());
-        metadata.grps(convertGrpsMap(m.getGroups()));
+        metadata.qryFlds = convertFieldsMap(m.getQueryFields());
+        metadata.ascFlds = convertFieldsMap(m.getAscendingFields());
+        metadata.descFlds = convertFieldsMap(m.getDescendingFields());
+        metadata.txtFlds = m.getTextFields();
+        metadata.grps = convertGrpsMap(m.getGroups());
 
         return metadata;
     }
@@ -167,13 +167,6 @@ public class VisorCacheTypeMetadata implements Serializable {
     }
 
     /**
-     * @param dbSchema New schema name in database.
-     */
-    public void dbSchema(String dbSchema) {
-        this.dbSchema = dbSchema;
-    }
-
-    /**
      * @return Schema name in database.
      */
     public String dbSchema() {
@@ -181,13 +174,6 @@ public class VisorCacheTypeMetadata implements Serializable {
     }
 
     /**
-     * @param dbTbl New table name in database.
-     */
-    public void dbTbl(String dbTbl) {
-        this.dbTbl = dbTbl;
-    }
-
-    /**
      * @return Table name in database.
      */
     public String dbTbl() {
@@ -195,13 +181,6 @@ public class VisorCacheTypeMetadata implements Serializable {
     }
 
     /**
-     * @param keyType New key class used to store key in cache.
-     */
-    public void keyType(String keyType) {
-        this.keyType = keyType;
-    }
-
-    /**
      * @return Key class used to store key in cache.
      */
     public String keyType() {
@@ -209,13 +188,6 @@ public class VisorCacheTypeMetadata implements Serializable {
     }
 
     /**
-     * @param valType New value class used to store value in cache.
-     */
-    public void valType(String valType) {
-        this.valType = valType;
-    }
-
-    /**
      * @return Value class used to store value in cache.
      */
     public String valType() {
@@ -223,13 +195,6 @@ public class VisorCacheTypeMetadata implements Serializable {
     }
 
     /**
-     * @param keyFields New key fields.
-     */
-    public void keyFields(Collection<VisorCacheTypeFieldMetadata> keyFields) {
-        this.keyFields = keyFields;
-    }
-
-    /**
      * @return Key fields.
      */
     public Collection<VisorCacheTypeFieldMetadata> keyFields() {
@@ -237,13 +202,6 @@ public class VisorCacheTypeMetadata implements Serializable {
     }
 
     /**
-     * @param valFields New value fields.
-     */
-    public void valFields(Collection<VisorCacheTypeFieldMetadata> valFields) {
-        this.valFields = valFields;
-    }
-
-    /**
      * @return Value fields.
      */
     public Collection<VisorCacheTypeFieldMetadata> valFields() {
@@ -251,13 +209,6 @@ public class VisorCacheTypeMetadata implements Serializable {
     }
 
     /**
-     * @param qryFlds New fields to be queried, in addition to indexed fields.
-     */
-    public void qryFlds(Map<String, String> qryFlds) {
-        this.qryFlds = qryFlds;
-    }
-
-    /**
      * @return Fields to be queried, in addition to indexed fields.
      */
     public Map<String, String> qryFlds() {
@@ -265,13 +216,6 @@ public class VisorCacheTypeMetadata implements Serializable {
     }
 
     /**
-     * @param ascFlds New fields to index in ascending order.
-     */
-    public void ascFlds(Map<String, String> ascFlds) {
-        this.ascFlds = ascFlds;
-    }
-
-    /**
      * @return Fields to index in ascending order.
      */
     public Map<String, String> ascFlds() {
@@ -279,13 +223,6 @@ public class VisorCacheTypeMetadata implements Serializable {
     }
 
     /**
-     * @param descFlds New fields to index in descending order.
-     */
-    public void descFlds(Map<String, String> descFlds) {
-        this.descFlds = descFlds;
-    }
-
-    /**
      * @return Fields to index in descending order.
      */
     public Map<String, String> descFlds() {
@@ -293,13 +230,6 @@ public class VisorCacheTypeMetadata implements Serializable {
     }
 
     /**
-     * @param txtFlds New fields to index as text.
-     */
-    public void txtFlds(Collection<String> txtFlds) {
-        this.txtFlds = txtFlds;
-    }
-
-    /**
      * @return Fields to index as text.
      */
     public Collection<String> txtFlds() {
@@ -307,13 +237,6 @@ public class VisorCacheTypeMetadata implements Serializable {
     }
 
     /**
-     * @param grps New fields to create group indexes for.
-     */
-    public void grps(Map<String, LinkedHashMap<String, IgniteBiTuple<String, Boolean>>>
grps) {
-        this.grps = grps;
-    }
-
-    /**
      * @return Fields to create group indexes for.
      */
     public Map<String, LinkedHashMap<String, IgniteBiTuple<String, Boolean>>>
grps() {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/576c8883/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsMetrics.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsMetrics.java
b/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsMetrics.java
index 2a82d4a..3f39fd0 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsMetrics.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/igfs/VisorIgfsMetrics.java
@@ -23,7 +23,7 @@ import org.apache.ignite.internal.util.typedef.internal.*;
 import java.io.*;
 
 /**
- * Data transfer object for {@link org.apache.ignite.igfs.IgfsMetrics}.
+ * Data transfer object for {@link IgfsMetrics}.
  */
 public class VisorIgfsMetrics implements Serializable {
     /** */
@@ -80,20 +80,20 @@ public class VisorIgfsMetrics implements Serializable {
 
         VisorIgfsMetrics metrics = new VisorIgfsMetrics();
 
-        metrics.totalSpaceSize(m.maxSpaceSize());
-        metrics.usedSpaceSize(m.localSpaceSize());
-        metrics.foldersCount(m.directoriesCount());
-        metrics.filesCount(m.filesCount());
-        metrics.filesOpenedForRead(m.filesOpenedForRead());
-        metrics.filesOpenedForWrite(m.filesOpenedForWrite());
-        metrics.blocksRead(m.blocksReadTotal());
-        metrics.blocksReadRemote(m.blocksReadRemote());
-        metrics.blocksWritten(m.blocksWrittenTotal());
-        metrics.blocksWrittenRemote(m.blocksWrittenRemote());
-        metrics.bytesRead(m.bytesRead());
-        metrics.bytesReadTime(m.bytesReadTime());
-        metrics.bytesWritten(m.bytesWritten());
-        metrics.bytesWriteTime(m.bytesWriteTime());
+        metrics.totalSpaceSz = m.maxSpaceSize();
+        metrics.usedSpaceSz = m.localSpaceSize();
+        metrics.foldersCnt = m.directoriesCount();
+        metrics.filesCnt = m.filesCount();
+        metrics.filesOpenedForRd = m.filesOpenedForRead();
+        metrics.filesOpenedForWrt = m.filesOpenedForWrite();
+        metrics.blocksRd = m.blocksReadTotal();
+        metrics.blocksRdRmt = m.blocksReadRemote();
+        metrics.blocksWrt = m.blocksWrittenTotal();
+        metrics.blocksWrtRmt = m.blocksWrittenRemote();
+        metrics.bytesRd = m.bytesRead();
+        metrics.bytesRdTm = m.bytesReadTime();
+        metrics.bytesWrt = m.bytesWritten();
+        metrics.bytesWrtTm = m.bytesWriteTime();
 
         return metrics;
     }
@@ -148,13 +148,6 @@ public class VisorIgfsMetrics implements Serializable {
     }
 
     /**
-     * @param totalSpaceSz New maximum amount of data that can be stored on local node.
-     */
-    public void totalSpaceSize(long totalSpaceSz) {
-        this.totalSpaceSz = totalSpaceSz;
-    }
-
-    /**
      * @return Local used space in bytes on local node.
      */
     public long usedSpaceSize() {
@@ -162,13 +155,6 @@ public class VisorIgfsMetrics implements Serializable {
     }
 
     /**
-     * @param usedSpaceSz New local used space in bytes on local node.
-     */
-    public void usedSpaceSize(long usedSpaceSz) {
-        this.usedSpaceSz = usedSpaceSz;
-    }
-
-    /**
      * @return Local free space in bytes on local node.
      */
     public long freeSpaceSize() {
@@ -183,13 +169,6 @@ public class VisorIgfsMetrics implements Serializable {
     }
 
     /**
-     * @param foldersCnt New number of directories created in file system.
-     */
-    public void foldersCount(int foldersCnt) {
-        this.foldersCnt = foldersCnt;
-    }
-
-    /**
      * @return Number of files stored in file system.
      */
     public int filesCount() {
@@ -197,13 +176,6 @@ public class VisorIgfsMetrics implements Serializable {
     }
 
     /**
-     * @param filesCnt New number of files stored in file system.
-     */
-    public void filesCount(int filesCnt) {
-        this.filesCnt = filesCnt;
-    }
-
-    /**
      * @return Number of files that are currently opened for reading on local node.
      */
     public int filesOpenedForRead() {
@@ -211,13 +183,6 @@ public class VisorIgfsMetrics implements Serializable {
     }
 
     /**
-     * @param filesOpenedForRd New number of files that are currently opened for reading
on local node.
-     */
-    public void filesOpenedForRead(int filesOpenedForRd) {
-        this.filesOpenedForRd = filesOpenedForRd;
-    }
-
-    /**
      * @return Number of files that are currently opened for writing on local node.
      */
     public int filesOpenedForWrite() {
@@ -225,13 +190,6 @@ public class VisorIgfsMetrics implements Serializable {
     }
 
     /**
-     * @param filesOpenedForWrt New number of files that are currently opened for writing
on local node.
-     */
-    public void filesOpenedForWrite(int filesOpenedForWrt) {
-        this.filesOpenedForWrt = filesOpenedForWrt;
-    }
-
-    /**
      * @return Total blocks read, local and remote.
      */
     public long blocksRead() {
@@ -239,13 +197,6 @@ public class VisorIgfsMetrics implements Serializable {
     }
 
     /**
-     * @param blocksRd New total blocks read, local and remote.
-     */
-    public void blocksRead(long blocksRd) {
-        this.blocksRd = blocksRd;
-    }
-
-    /**
      * @return Total remote blocks read.
      */
     public long blocksReadRemote() {
@@ -253,13 +204,6 @@ public class VisorIgfsMetrics implements Serializable {
     }
 
     /**
-     * @param blocksRdRmt New total remote blocks read.
-     */
-    public void blocksReadRemote(long blocksRdRmt) {
-        this.blocksRdRmt = blocksRdRmt;
-    }
-
-    /**
      * @return Total blocks write, local and remote.
      */
     public long blocksWritten() {
@@ -267,13 +211,6 @@ public class VisorIgfsMetrics implements Serializable {
     }
 
     /**
-     * @param blocksWrt New total blocks write, local and remote.
-     */
-    public void blocksWritten(long blocksWrt) {
-        this.blocksWrt = blocksWrt;
-    }
-
-    /**
      * @return Total remote blocks write.
      */
     public long blocksWrittenRemote() {
@@ -281,13 +218,6 @@ public class VisorIgfsMetrics implements Serializable {
     }
 
     /**
-     * @param blocksWrtRmt New total remote blocks write.
-     */
-    public void blocksWrittenRemote(long blocksWrtRmt) {
-        this.blocksWrtRmt = blocksWrtRmt;
-    }
-
-    /**
      * @return Total bytes read.
      */
     public long bytesRead() {
@@ -295,13 +225,6 @@ public class VisorIgfsMetrics implements Serializable {
     }
 
     /**
-     * @param bytesRd New total bytes read.
-     */
-    public void bytesRead(long bytesRd) {
-        this.bytesRd = bytesRd;
-    }
-
-    /**
      * @return Total bytes read time.
      */
     public long bytesReadTime() {
@@ -309,13 +232,6 @@ public class VisorIgfsMetrics implements Serializable {
     }
 
     /**
-     * @param bytesRdTm New total bytes read time.
-     */
-    public void bytesReadTime(long bytesRdTm) {
-        this.bytesRdTm = bytesRdTm;
-    }
-
-    /**
      * @return Total bytes write.
      */
     public long bytesWritten() {
@@ -323,26 +239,12 @@ public class VisorIgfsMetrics implements Serializable {
     }
 
     /**
-     * @param bytesWrt New total bytes write.
-     */
-    public void bytesWritten(long bytesWrt) {
-        this.bytesWrt = bytesWrt;
-    }
-
-    /**
      * @return Total bytes write time.
      */
     public long bytesWriteTime() {
         return bytesWrtTm;
     }
 
-    /**
-     * @param bytesWrtTm New total bytes write time.
-     */
-    public void bytesWriteTime(long bytesWrtTm) {
-        this.bytesWrtTm = bytesWrtTm;
-    }
-
     /** {@inheritDoc} */
     @Override public String toString() {
         return S.toString(VisorIgfsMetrics.class, this);


Mime
View raw message