ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [04/50] ignite git commit: ignite-2.1 Added map with previous snapshots.
Date Tue, 11 Jul 2017 09:27:03 GMT
ignite-2.1 Added map with previous snapshots.


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

Branch: refs/heads/master
Commit: 30922ed8ac518749a2559aff51fe183a890041bb
Parents: f589628
Author: Alexey Kuznetsov <akuznetsov@apache.org>
Authored: Fri Jul 7 18:03:18 2017 +0700
Committer: Alexey Kuznetsov <akuznetsov@apache.org>
Committed: Fri Jul 7 18:03:18 2017 +0700

----------------------------------------------------------------------
 .../pagemem/snapshot/SnapshotOperation.java        | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/30922ed8/modules/core/src/main/java/org/apache/ignite/internal/pagemem/snapshot/SnapshotOperation.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/snapshot/SnapshotOperation.java
b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/snapshot/SnapshotOperation.java
index 863107a..fa18cd7 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/pagemem/snapshot/SnapshotOperation.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/pagemem/snapshot/SnapshotOperation.java
@@ -20,6 +20,7 @@ package org.apache.ignite.internal.pagemem.snapshot;
 import java.io.File;
 import java.io.Serializable;
 import java.util.Collection;
+import java.util.Map;
 import java.util.Set;
 
 /**
@@ -50,6 +51,9 @@ public class SnapshotOperation implements Serializable {
     /** Optional list of dependent snapshot IDs. */
     private final Set<Long> dependentSnapshotIds;
 
+    /** Optional map of previous snapshots grouped by caches. */
+    private final Map<Long, Set<String>> prevSnapshots;
+
     /**
      * @param type Type.
      * @param snapshotId Snapshot id.
@@ -58,6 +62,7 @@ public class SnapshotOperation implements Serializable {
      * @param msg Extra user message.
      * @param extraParam Additional parameter.
      * @param dependentSnapshotIds Optional list of dependent snapshot IDs.
+     * @param prevSnapshots Optional map of previous snapshots grouped by caches.
      */
     public SnapshotOperation(
         SnapshotOperationType type,
@@ -66,7 +71,8 @@ public class SnapshotOperation implements Serializable {
         Set<String> cacheNames,
         String msg,
         Object extraParam,
-        Set<Long> dependentSnapshotIds
+        Set<Long> dependentSnapshotIds,
+        Map<Long, Set<String>> prevSnapshots
     ) {
         this.type = type;
         this.snapshotId = snapshotId;
@@ -75,6 +81,7 @@ public class SnapshotOperation implements Serializable {
         this.msg = msg;
         this.extraParam = extraParam;
         this.dependentSnapshotIds = dependentSnapshotIds;
+        this.prevSnapshots = prevSnapshots;
     }
 
     /**
@@ -131,6 +138,13 @@ public class SnapshotOperation implements Serializable {
     }
 
     /**
+     * @return Cache names grouped by previous snapshot IDs.
+     */
+    public Map<Long, Set<String>> previousSnapshots() {
+        return prevSnapshots;
+    }
+
+    /**
      * @param op Op.
      */
     public static Collection<File> getOptionalPathsParameter(SnapshotOperation op)
{
@@ -215,6 +229,7 @@ public class SnapshotOperation implements Serializable {
             ", msg='" + msg + '\'' +
             ", extraParam=" + extraParam +
             ", dependentSnapshotIds=" + dependentSnapshotIds +
+            ", prevSnapshots=" + prevSnapshots +
             '}';
     }
 }


Mime
View raw message