You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2017/07/10 12:00:20 UTC

[04/41] ignite git commit: ignite-2.1 Added map with previous snapshots.

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/ignite-5578-1
Commit: 30922ed8ac518749a2559aff51fe183a890041bb
Parents: f589628
Author: Alexey Kuznetsov <ak...@apache.org>
Authored: Fri Jul 7 18:03:18 2017 +0700
Committer: Alexey Kuznetsov <ak...@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 +
             '}';
     }
 }