   (str "split(" (or key "") ")"))
 
 (defn attach [model update-fn]
-     (connect model (proxy [View] [] (update [insertions alterations deletions] (update-fn insertions alterations deletions)))))
+     (connect model (reify View (update [_ insertions alterations deletions] (update-fn insertions alterations deletions)))))
 
 (defn dsplit2 [split-key split-key-fn]
   (fn [[src-metadata-fn direct-fn]]

(defn make-count-reducer-strategy [#^Metadata src-metadata #^Metadata tgt-metadata & [count-key]]
  ;; TODO - use count-key
  (let [creator (.getCreator tgt-metadata)]
    (proxy
     [Reducer$Strategy]
     []
     (initialValue [] 0)
     (initialType [type] Integer)
     (currentValue [extra-values version value]
		   (trace (str "COUNT " (pr-str extra-values) " -  " (type version) " " version " " value))
		   (.create creator (into-array Object (concat extra-values [(Integer. version) value])))) ;TODO - inefficient
     (reduce [insertions alterations deletions] (- (count insertions) (count deletions)))
     (apply [currentValue delta] (+ currentValue delta))
     )
    ))

(defn do-reduce-count

  (map (fn [#^Getter getter] (.get getter value)) getters))

(def #^Metadata$VersionComparator int-version-comparator
     (reify Metadata$VersionComparator (compareTo [_ old new] (- (.getVersion old) (.getVersion new)))))

;;----------------------------------------
;; Filtration - should be implemented as a thin wrapper around Splitter
