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 2017/07/11 12:27:22 UTC
[7/8] ignite git commit: IGNITE-5479 - Clean up public API
IGNITE-5479 - Clean up public API
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/8a64081c
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/8a64081c
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/8a64081c
Branch: refs/heads/ignite-5479
Commit: 8a64081c6161c87d0a9c392308b06bb890c54d27
Parents: 4775b3d
Author: Alexey Goncharuk <al...@gmail.com>
Authored: Tue Jul 11 15:11:52 2017 +0300
Committer: Alexey Goncharuk <al...@gmail.com>
Committed: Tue Jul 11 15:12:15 2017 +0300
----------------------------------------------------------------------
.../configuration/PersistentStoreConfiguration.java | 10 +++++-----
.../cache/persistence/GridCacheDatabaseSharedManager.java | 4 ++--
.../platform/utils/PlatformConfigurationUtils.java | 4 +---
.../visor/node/VisorPersistentStoreConfiguration.java | 6 +++---
4 files changed, 11 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/8a64081c/modules/core/src/main/java/org/apache/ignite/configuration/PersistentStoreConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/configuration/PersistentStoreConfiguration.java b/modules/core/src/main/java/org/apache/ignite/configuration/PersistentStoreConfiguration.java
index aa34bba..7706bf3 100644
--- a/modules/core/src/main/java/org/apache/ignite/configuration/PersistentStoreConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/configuration/PersistentStoreConfiguration.java
@@ -93,7 +93,7 @@ public class PersistentStoreConfiguration implements Serializable {
private long lockWaitTime = DFLT_LOCK_WAIT_TIME;
/** */
- private Long checkpointingPageBufSize;
+ private long checkpointingPageBufSize;
/** */
private int checkpointingThreads = DFLT_CHECKPOINTING_THREADS;
@@ -199,10 +199,10 @@ public class PersistentStoreConfiguration implements Serializable {
/**
* Gets amount of memory allocated for a checkpointing temporary buffer.
*
- * @return Checkpointing page buffer size in bytes or {@code null} for Ignite
+ * @return Checkpointing page buffer size in bytes or {@code 0} for Ignite
* to choose the buffer size automatically.
*/
- public Long getCheckpointingPageBufferSize() {
+ public long getCheckpointingPageBufferSize() {
return checkpointingPageBufSize;
}
@@ -211,11 +211,11 @@ public class PersistentStoreConfiguration implements Serializable {
* copies of pages that are being written to disk and being update in parallel while the checkpointing is in
* progress.
*
- * @param checkpointingPageBufSize Checkpointing page buffer size in bytes or {@code null} for Ignite to
+ * @param checkpointingPageBufSize Checkpointing page buffer size in bytes or {@code 0} for Ignite to
* choose the buffer size automatically.
* @return {@code this} for chaining.
*/
- public PersistentStoreConfiguration setCheckpointingPageBufferSize(Long checkpointingPageBufSize) {
+ public PersistentStoreConfiguration setCheckpointingPageBufferSize(long checkpointingPageBufSize) {
this.checkpointingPageBufSize = checkpointingPageBufSize;
return this;
http://git-wip-us.apache.org/repos/asf/ignite/blob/8a64081c/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java
index 08b55bb..122d460 100755
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/GridCacheDatabaseSharedManager.java
@@ -377,7 +377,7 @@ public class GridCacheDatabaseSharedManager extends IgniteCacheDatabaseSharedMan
*
*/
private void initDataBase() {
- Long cpBufSize = persistenceCfg.getCheckpointingPageBufferSize();
+ long cpBufSize = persistenceCfg.getCheckpointingPageBufferSize();
if (persistenceCfg.getCheckpointingThreads() > 1)
asyncRunner = new ThreadPoolExecutor(
@@ -390,7 +390,7 @@ public class GridCacheDatabaseSharedManager extends IgniteCacheDatabaseSharedMan
// Intentionally use identity comparison to check if configuration default has changed.
//noinspection NumberEquality
- if (cpBufSize == null) {
+ if (cpBufSize == 0L) {
cpBufSize = PersistentStoreConfiguration.DFLT_CHECKPOINTING_PAGE_BUFFER_SIZE;
MemoryConfiguration memCfg = cctx.kernalContext().config().getMemoryConfiguration();
http://git-wip-us.apache.org/repos/asf/ignite/blob/8a64081c/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformConfigurationUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformConfigurationUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformConfigurationUtils.java
index a909434..8c9f5e1 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformConfigurationUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformConfigurationUtils.java
@@ -1520,9 +1520,7 @@ public class PlatformConfigurationUtils {
w.writeString(cfg.getPersistentStorePath());
w.writeLong(cfg.getCheckpointingFrequency());
- w.writeLong(cfg.getCheckpointingPageBufferSize() == null ?
- PersistentStoreConfiguration.DFLT_CHECKPOINTING_PAGE_BUFFER_SIZE :
- cfg.getCheckpointingPageBufferSize());
+ w.writeLong(cfg.getCheckpointingPageBufferSize());
w.writeInt(cfg.getCheckpointingThreads());
w.writeLong(cfg.getLockWaitTime());
w.writeInt(cfg.getWalHistorySize());
http://git-wip-us.apache.org/repos/asf/ignite/blob/8a64081c/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorPersistentStoreConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorPersistentStoreConfiguration.java b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorPersistentStoreConfiguration.java
index 5b973ed..abbab4c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorPersistentStoreConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/visor/node/VisorPersistentStoreConfiguration.java
@@ -42,7 +42,7 @@ public class VisorPersistentStoreConfiguration extends VisorDataTransferObject {
private long lockWaitTime;
/** */
- private Long checkpointingPageBufSize;
+ private long checkpointingPageBufSize;
/** */
private int checkpointingThreads;
@@ -259,7 +259,7 @@ public class VisorPersistentStoreConfiguration extends VisorDataTransferObject {
U.writeString(out, persistenceStorePath);
out.writeLong(checkpointingFreq);
out.writeLong(lockWaitTime);
- out.writeObject(checkpointingPageBufSize);
+ out.writeLong(checkpointingPageBufSize);
out.writeInt(checkpointingThreads);
out.writeInt(walHistSize);
out.writeInt(walSegments);
@@ -282,7 +282,7 @@ public class VisorPersistentStoreConfiguration extends VisorDataTransferObject {
persistenceStorePath = U.readString(in);
checkpointingFreq = in.readLong();
lockWaitTime = in.readLong();
- checkpointingPageBufSize = (Long)in.readObject();
+ checkpointingPageBufSize = in.readLong();
checkpointingThreads = in.readInt();
walHistSize = in.readInt();
walSegments = in.readInt();