Ensure appropriate leader elector state machine commands are marked with the SNAPSHOT compaction mode to prevent premature exclusion of the commands from the Atomix replication protocol.

Change-Id: I9fd8ca56f652399f8fa3101e4904ad3fefbb368b
diff --git a/core/store/primitives/src/main/java/org/onosproject/store/primitives/resources/impl/AtomixLeaderElectorCommands.java b/core/store/primitives/src/main/java/org/onosproject/store/primitives/resources/impl/AtomixLeaderElectorCommands.java
index 1bd06a1..87e6bcc 100644
--- a/core/store/primitives/src/main/java/org/onosproject/store/primitives/resources/impl/AtomixLeaderElectorCommands.java
+++ b/core/store/primitives/src/main/java/org/onosproject/store/primitives/resources/impl/AtomixLeaderElectorCommands.java
@@ -48,7 +48,6 @@
      */
     @SuppressWarnings("serial")
     public abstract static class ElectionQuery<V> implements Query<V>, CatalystSerializable {
-
         @Override
         public void writeObject(BufferOutput<?> buffer, Serializer serializer) {
         }
@@ -111,6 +110,10 @@
      */
     @SuppressWarnings("serial")
     public static class Listen extends ElectionCommand<Void> {
+        @Override
+        public CompactionMode compaction() {
+            return CompactionMode.QUORUM;
+        }
     }
 
     /**
@@ -118,10 +121,9 @@
      */
     @SuppressWarnings("serial")
     public static class Unlisten extends ElectionCommand<Void> {
-
         @Override
         public CompactionMode compaction() {
-            return CompactionMode.QUORUM;
+            return CompactionMode.TOMBSTONE;
         }
     }
 
@@ -231,6 +233,11 @@
         }
 
         @Override
+        public CompactionMode compaction() {
+            return CompactionMode.SNAPSHOT;
+        }
+
+        @Override
         public String toString() {
             return MoreObjects.toStringHelper(getClass())
                     .add("topic", topic)
@@ -275,6 +282,11 @@
         }
 
         @Override
+        public CompactionMode compaction() {
+            return CompactionMode.SNAPSHOT;
+        }
+
+        @Override
         public String toString() {
             return MoreObjects.toStringHelper(getClass())
                     .add("topic", topic)
@@ -329,6 +341,11 @@
         }
 
         @Override
+        public CompactionMode compaction() {
+            return CompactionMode.SNAPSHOT;
+        }
+
+        @Override
         public String toString() {
             return MoreObjects.toStringHelper(getClass())
                     .add("topic", topic)
@@ -401,6 +418,11 @@
         }
 
         @Override
+        public CompactionMode compaction() {
+            return CompactionMode.SNAPSHOT;
+        }
+
+        @Override
         public String toString() {
             return MoreObjects.toStringHelper(getClass())
                     .add("nodeId", nodeId)