Interface change to accommodate Asterix' need to properly set LSNs in merged components.

git-svn-id: https://hyracks.googlecode.com/svn/branches/hyracks_lsm_tree@2417 123451ca-8445-de46-9d55-352943316053
diff --git a/hyracks-storage-am-lsm-common/src/main/java/edu/uci/ics/hyracks/storage/am/lsm/common/api/ILSMIOOperationCallback.java b/hyracks-storage-am-lsm-common/src/main/java/edu/uci/ics/hyracks/storage/am/lsm/common/api/ILSMIOOperationCallback.java
index b7ed45b..f6e2b75 100644
--- a/hyracks-storage-am-lsm-common/src/main/java/edu/uci/ics/hyracks/storage/am/lsm/common/api/ILSMIOOperationCallback.java
+++ b/hyracks-storage-am-lsm-common/src/main/java/edu/uci/ics/hyracks/storage/am/lsm/common/api/ILSMIOOperationCallback.java
@@ -1,11 +1,14 @@
 package edu.uci.ics.hyracks.storage.am.lsm.common.api;
 
+import java.util.List;
+
 import edu.uci.ics.hyracks.api.exceptions.HyracksDataException;
 
 public interface ILSMIOOperationCallback {
     public void beforeOperation(ILSMIOOperation operation) throws HyracksDataException;
-    
-    public void afterOperation(ILSMIOOperation operation, Object newComponent) throws HyracksDataException;
-    
+
+    public void afterOperation(ILSMIOOperation operation, List<Object> oldComponents, Object newComponent)
+            throws HyracksDataException;
+
     public void afterFinalize(ILSMIOOperation operation, Object newComponent) throws HyracksDataException;
 }
diff --git a/hyracks-storage-am-lsm-common/src/main/java/edu/uci/ics/hyracks/storage/am/lsm/common/impls/BlockingIOOperationCallback.java b/hyracks-storage-am-lsm-common/src/main/java/edu/uci/ics/hyracks/storage/am/lsm/common/impls/BlockingIOOperationCallback.java
index 53e7224..d8d4d81 100644
--- a/hyracks-storage-am-lsm-common/src/main/java/edu/uci/ics/hyracks/storage/am/lsm/common/impls/BlockingIOOperationCallback.java
+++ b/hyracks-storage-am-lsm-common/src/main/java/edu/uci/ics/hyracks/storage/am/lsm/common/impls/BlockingIOOperationCallback.java
@@ -1,5 +1,7 @@
 package edu.uci.ics.hyracks.storage.am.lsm.common.impls;
 
+import java.util.List;
+
 import edu.uci.ics.hyracks.api.exceptions.HyracksDataException;
 import edu.uci.ics.hyracks.storage.am.lsm.common.api.ILSMIOOperation;
 import edu.uci.ics.hyracks.storage.am.lsm.common.api.ILSMIOOperationCallback;
@@ -21,7 +23,8 @@
     }
 
     @Override
-    public void afterOperation(ILSMIOOperation operation, Object newComponent) throws HyracksDataException {
+    public void afterOperation(ILSMIOOperation operation, List<Object> oldComponents, Object newComponent)
+            throws HyracksDataException {
         // Do nothing.
     }
 
diff --git a/hyracks-storage-am-lsm-common/src/main/java/edu/uci/ics/hyracks/storage/am/lsm/common/impls/LSMHarness.java b/hyracks-storage-am-lsm-common/src/main/java/edu/uci/ics/hyracks/storage/am/lsm/common/impls/LSMHarness.java
index 00020e6..8676ffe 100644
--- a/hyracks-storage-am-lsm-common/src/main/java/edu/uci/ics/hyracks/storage/am/lsm/common/impls/LSMHarness.java
+++ b/hyracks-storage-am-lsm-common/src/main/java/edu/uci/ics/hyracks/storage/am/lsm/common/impls/LSMHarness.java
@@ -123,7 +123,7 @@
         try {
             operation.getCallback().beforeOperation(operation);
             newComponent = lsmIndex.flush(operation);
-            operation.getCallback().afterOperation(operation, newComponent);
+            operation.getCallback().afterOperation(operation, null, newComponent);
             
             // The implementation of this call must take any necessary steps to make
             // the new component permanent, and mark it as valid (usually this means
@@ -198,7 +198,7 @@
         try {
             operation.getCallback().beforeOperation(operation);
             newComponent = lsmIndex.merge(mergedComponents, operation);
-            operation.getCallback().afterOperation(operation, newComponent);
+            operation.getCallback().afterOperation(operation, mergedComponents, newComponent);
             
             // No merge happened.
             if (newComponent == null) {
diff --git a/hyracks-storage-am-lsm-common/src/main/java/edu/uci/ics/hyracks/storage/am/lsm/common/impls/NoOpIOOperationCallback.java b/hyracks-storage-am-lsm-common/src/main/java/edu/uci/ics/hyracks/storage/am/lsm/common/impls/NoOpIOOperationCallback.java
index 24bd16c..427c061 100644
--- a/hyracks-storage-am-lsm-common/src/main/java/edu/uci/ics/hyracks/storage/am/lsm/common/impls/NoOpIOOperationCallback.java
+++ b/hyracks-storage-am-lsm-common/src/main/java/edu/uci/ics/hyracks/storage/am/lsm/common/impls/NoOpIOOperationCallback.java
@@ -1,5 +1,7 @@
 package edu.uci.ics.hyracks.storage.am.lsm.common.impls;
 
+import java.util.List;
+
 import edu.uci.ics.hyracks.api.exceptions.HyracksDataException;
 import edu.uci.ics.hyracks.storage.am.lsm.common.api.ILSMIOOperation;
 import edu.uci.ics.hyracks.storage.am.lsm.common.api.ILSMIOOperationCallback;
@@ -13,7 +15,8 @@
     }
 
     @Override
-    public void afterOperation(ILSMIOOperation operation, Object newComponent) throws HyracksDataException {
+    public void afterOperation(ILSMIOOperation operation, List<Object> oldComponents, Object newComponent)
+            throws HyracksDataException {
         // Do nothing.
     }
 
diff --git a/hyracks-storage-am-lsm-common/src/main/java/edu/uci/ics/hyracks/storage/am/lsm/common/impls/ReferenceCountingOperationTracker.java b/hyracks-storage-am-lsm-common/src/main/java/edu/uci/ics/hyracks/storage/am/lsm/common/impls/ReferenceCountingOperationTracker.java
index b77a97e..6fac9d4 100644
--- a/hyracks-storage-am-lsm-common/src/main/java/edu/uci/ics/hyracks/storage/am/lsm/common/impls/ReferenceCountingOperationTracker.java
+++ b/hyracks-storage-am-lsm-common/src/main/java/edu/uci/ics/hyracks/storage/am/lsm/common/impls/ReferenceCountingOperationTracker.java
@@ -1,5 +1,7 @@
 package edu.uci.ics.hyracks.storage.am.lsm.common.impls;
 
+import java.util.List;
+
 import edu.uci.ics.hyracks.api.exceptions.HyracksDataException;
 import edu.uci.ics.hyracks.storage.am.common.impls.NoOpOperationCallback;
 import edu.uci.ics.hyracks.storage.am.lsm.common.api.ILSMIOOperation;
@@ -64,7 +66,8 @@
         }
 
         @Override
-        public void afterOperation(ILSMIOOperation operation, Object newComponent) throws HyracksDataException {
+        public void afterOperation(ILSMIOOperation operation, List<Object> oldComponents, Object newComponent)
+                throws HyracksDataException {
             // Do nothing.
         }