geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vfor...@apache.org
Subject [11/15] incubator-geode git commit: GEODE-628: Rename container folder to "geode-jvsd". - The jvsd code now sits in the geode-jvsd directory. - Files "pom.xml", "README.txt" and "runjvsd.sh" updated.
Date Wed, 13 Jan 2016 17:14:36 GMT
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8a86c01a/jvsdfx-mm/src/main/java/org/apache/geode/jvsd/chart/util/LargestTriangleThreeBuckets.java
----------------------------------------------------------------------
diff --git a/jvsdfx-mm/src/main/java/org/apache/geode/jvsd/chart/util/LargestTriangleThreeBuckets.java b/jvsdfx-mm/src/main/java/org/apache/geode/jvsd/chart/util/LargestTriangleThreeBuckets.java
deleted file mode 100644
index 2d1233e..0000000
--- a/jvsdfx-mm/src/main/java/org/apache/geode/jvsd/chart/util/LargestTriangleThreeBuckets.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/* 
- * Copied and ported from https://raw.githubusercontent.com/sveinn-steinarsson/flot-downsample/master/jquery.flot.downsample.js
- * Portions of this file are under the following license:
- * 
- * The MIT License
- * 
- * Copyright (c) 2013 by Sveinn Steinarsson
- * 
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- * 
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- * 
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-
-package org.apache.geode.jvsd.chart.util;
-
-/**
- * Java implementation of Largest Triangle Three Bucket downsampling algorithm
- * based on http://skemman.is/stream/get/1946/15343/37285/3/SS_MSthesis.pdf.
- * 
- * @author jbarrett
- * 
- */
-public class LargestTriangleThreeBuckets {
-
-  public static final Number[][] downsample(final Number[][] data, final int threshold) {
-
-    final int dataLength = data.length;
-    if (threshold >= dataLength || 0 == threshold) {
-      return data; // Nothing to do
-    }
-
-    final Number[][] sampled = new Number[threshold][];
-    int sampledIndex = 0;
-
-    // Bucket size. Leave room for start and end data points
-    final double bucketSize = (double) (dataLength - 2) / (threshold - 2);
-
-    int a = 0; // Initially a is the first point in the triangle
-    int nextA = 0;
-
-    sampled[sampledIndex++] = data[a]; // Always add the first point
-
-    for (int i = 0; i < threshold - 2; i++) {
-
-      // Calculate point average for next bucket (containing c)
-      double pointCX = 0;
-      double pointCY = 0;
-      int pointCStart = (int) Math.floor((i + 1) * bucketSize) + 1;
-      int pointCEnd = (int) Math.floor((i + 2) * bucketSize) + 1;
-      pointCEnd = pointCEnd < dataLength ? pointCEnd : dataLength;
-      final int pointCSize = pointCEnd - pointCStart;
-      for (; pointCStart < pointCEnd; pointCStart++) {
-        pointCX += data[pointCStart][0].doubleValue(); // TODO DATE??
-        pointCY += data[pointCStart][1].doubleValue();
-      }
-      pointCX /= pointCSize;
-      pointCY /= pointCSize;
-
-      // Point a
-      double pointAX = data[a][0].doubleValue(); // TODO Date
-      double pointAY = data[a][1].doubleValue();
-
-      // Get the range for bucket b
-      int pointBStart = (int) Math.floor((i + 0) * bucketSize) + 1;
-      final int pointBEnd = (int) Math.floor((i + 1) * bucketSize) + 1;
-      double maxArea = -1;
-      Number[] maxAreaPoint = null;
-      for (; pointBStart < pointBEnd; pointBStart++) {
-        // Calculate triangle area over three buckets
-        final double area = Math.abs((pointAX - pointCX) * (data[pointBStart][1].doubleValue() - pointAY) - (pointAX - data[pointBStart][0].doubleValue())
-            * (pointCY - pointAY)) * 0.5;
-        if (area > maxArea) {
-          maxArea = area;
-          maxAreaPoint = data[pointBStart];
-          nextA = pointBStart; // Next a is this b
-        }
-      }
-
-      sampled[sampledIndex++] = maxAreaPoint; // Pick this point from the bucket
-      a = nextA; // This a is the next a (chosen b)
-    }
-
-    sampled[sampledIndex++] = data[dataLength - 1]; // Always add last
-
-    return sampled;
-  }
-
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8a86c01a/jvsdfx-mm/src/main/java/org/apache/geode/jvsd/controller/RootController.java
----------------------------------------------------------------------
diff --git a/jvsdfx-mm/src/main/java/org/apache/geode/jvsd/controller/RootController.java b/jvsdfx-mm/src/main/java/org/apache/geode/jvsd/controller/RootController.java
deleted file mode 100644
index b0c6fb4..0000000
--- a/jvsdfx-mm/src/main/java/org/apache/geode/jvsd/controller/RootController.java
+++ /dev/null
@@ -1,239 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.geode.jvsd.controller;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import java.util.ResourceBundle;
-
-import javafx.collections.FXCollections;
-import javafx.collections.ObservableList;
-import javafx.event.ActionEvent;
-import javafx.fxml.FXML;
-import javafx.fxml.Initializable;
-import javafx.scene.control.Button;
-import javafx.scene.control.ComboBox;
-import javafx.scene.control.ListView;
-import javafx.scene.control.SelectionMode;
-import javafx.scene.control.TableColumn;
-import javafx.scene.control.TableView;
-import javafx.scene.control.cell.PropertyValueFactory;
-import javafx.stage.FileChooser;
-
-import org.apache.geode.jvsd.fx.ChartManager;
-import org.apache.geode.jvsd.fx.StatFileManager;
-import org.apache.geode.jvsd.model.ResourceWrapper;
-import org.apache.geode.jvsd.model.stats.StatArchiveFile;
-import org.apache.geode.jvsd.model.stats.StatArchiveFile.StatValue;
-
-/**
- * @author Jens Deppe
- */
-public class RootController implements Initializable {
-
-  @FXML
-  private TableView<ResourceWrapper> tableView;
-
-  @FXML
-  private ListView listView;
-
-  @FXML
-  private Button newChartButton;
-
-  @FXML
-  private Button addToChartButton;
-
-  @FXML
-  private ComboBox chartCombo;
-
-  private ObservableList<Integer> chartList;
-
-  private ObservableList<ResourceWrapper> resources;
-
-  private ObservableList statNames;
-
-  private StatFileManager fileManager = StatFileManager.getInstance();
-
-  private ChartManager chartManager = ChartManager.getInstance();
-
-  @Override
-  public void initialize(URL url, ResourceBundle resourceBundle) {
-    double[] columnPercent = {
-        0.05,  // Row
-        0.25,  // Start Time
-        0.05,  // File
-        0.075, // Samples
-        0.075, // PID
-        0.2,   // Type
-        0.3    // Name
-    };
-
-    ObservableList<TableColumn<ResourceWrapper, ?>> cols = tableView.getColumns();
-    // Set column widths
-    for (int i = 0; i < 7; i++) {
-      cols.get(i).prefWidthProperty().
-          bind(tableView.widthProperty().multiply(columnPercent[i]));
-    }
-
-    cols.get(0).setCellValueFactory(new PropertyValueFactory<>("row"));
-    cols.get(1).setCellValueFactory(new PropertyValueFactory<>("startTime"));
-    cols.get(2).setCellValueFactory(new PropertyValueFactory<>("file"));
-    cols.get(3).setCellValueFactory(new PropertyValueFactory<>("samples"));
-    cols.get(4).setCellValueFactory(new PropertyValueFactory<>("pid"));
-    cols.get(5).setCellValueFactory(new PropertyValueFactory<>("type"));
-    cols.get(6).setCellValueFactory(new PropertyValueFactory<>("name"));
-
-    resources = FXCollections.observableArrayList();
-
-        updateArchives();
-
-    tableView.setItems(resources);
-    tableView.getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE);
-    tableView.getSelectionModel().selectedItemProperty().addListener(
-        (observableValue, oldValue, newValue) -> {
-          updateStatList();
-        });
-
-    statNames = FXCollections.observableArrayList();
-    listView.setItems(statNames);
-    listView.getSelectionModel().setSelectionMode(SelectionMode.SINGLE);
-    listView.getSelectionModel().selectedItemProperty().addListener(
-        (observableValue, oldValue, newValue) -> {
-          System.out.println(newValue);
-        });
-
-    chartList = FXCollections.observableArrayList();
-    chartCombo.setItems(chartList);
-  }
-
-    private void updateArchives() {
-        int row = 0;
-        for (StatArchiveFile s : fileManager.getArchives()) {
-            for (StatArchiveFile.ResourceInst r : s.getResourceInstList()) {
-                resources.add(new ResourceWrapper(r, row++));
-            }
-        }
-    }
-
-  private List<StatValue> getSelectedStatValues() {
-    List<StatValue> result = new ArrayList<>();
-
-    List<String> statNames = listView.getSelectionModel().getSelectedItems();
-    ObservableList<ResourceWrapper> rows =
-        tableView.getSelectionModel().getSelectedItems();
-    if (rows != null && rows.size() > 0) {
-      for (ResourceWrapper r : rows) {
-        for (String stat : statNames) {
-          StatValue sv = r.getStatValue(stat);
-          result.add(sv);
-        }
-      }
-    }
-
-    return result;
-  }
-
-  @FXML
-  private void newChartButtonClicked() {
-    List<StatValue> svs = getSelectedStatValues();
-    if (svs.size() > 0) {
-      try {
-        int id = chartManager.newChart(svs.get(0));
-        svs.remove(0);
-        for (StatValue s : svs) {
-          chartManager.addToChart(id, s);
-        }
-        chartCombo.getSelectionModel().select(id);
-      } catch (IOException iox) {
-        iox.printStackTrace();
-      }
-    }
-  }
-
-  @FXML
-  private void addToChartButtonClicked() {
-    Integer i = (Integer) chartCombo.getSelectionModel().getSelectedItem();
-    List<StatValue> svs = getSelectedStatValues();
-    try {
-      for (StatValue s : svs) {
-        chartManager.addToChart(i, s);
-      }
-    } catch (IOException iox) {
-      iox.printStackTrace();
-    }
-  }
-
-  @FXML
-  private void handleOpenMenuAction(ActionEvent e){
-      try {
-          FileChooser fileChooser = new FileChooser();
-          fileChooser.setTitle("Open Statistics File");
-          File file=fileChooser.showOpenDialog(null);
-          StatFileManager.getInstance().add(file.getCanonicalPath());
-          updateArchives();
-      } catch (IOException ex) {
-          //TODO needs warning dialog of failed file open.
-      }
-  }
-  
-  @FXML
-  private void handleCloseMenuAction(ActionEvent e){
-    //TODO do a real clean up and shutdown   
-    //just kill it now
-      System.exit(0);
-  }
-  
-  public void setChartList(Collection<Integer> chartList) {
-    if (chartList.size() > 0) {
-      chartCombo.setDisable(false);
-      this.chartList.clear();
-      this.chartList.addAll(chartList);
-      this.chartCombo.getSelectionModel().select(0);
-      addToChartButton.setDisable(false);
-    } else {
-      this.chartList.clear();
-      chartCombo.setDisable(true);
-      addToChartButton.setDisable(true);
-    }
-
-  }
-
-  private void updateStatList() {
-    ObservableList<ResourceWrapper> rows =
-        tableView.getSelectionModel().getSelectedItems();
-    List<String> tmpStatNames = rows.get(0).getStatNames();
-
-    for (int i = 1; i < rows.size(); i++) {
-      List<String> tmpNames = rows.get(i).getStatNames();
-      Iterator<String> it = tmpStatNames.iterator();
-      while (it.hasNext()) {
-        String s = it.next();
-        if (!tmpNames.contains(s)) {
-          it.remove();
-        }
-      }
-    }
-
-    statNames.clear();
-    statNames.addAll(tmpStatNames);
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8a86c01a/jvsdfx-mm/src/main/java/org/apache/geode/jvsd/fx/ChartManager.java
----------------------------------------------------------------------
diff --git a/jvsdfx-mm/src/main/java/org/apache/geode/jvsd/fx/ChartManager.java b/jvsdfx-mm/src/main/java/org/apache/geode/jvsd/fx/ChartManager.java
deleted file mode 100644
index e5d10d0..0000000
--- a/jvsdfx-mm/src/main/java/org/apache/geode/jvsd/fx/ChartManager.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.geode.jvsd.fx;
-
-import javafx.fxml.FXMLLoader;
-import javafx.scene.Scene;
-import javafx.scene.layout.Pane;
-import javafx.stage.Stage;
-
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.geode.jvsd.controller.RootController;
-import org.apache.geode.jvsd.model.stats.StatArchiveFile;
-
-/**
- * Basic container for all charts which are currently being displayed
- *
- * @author Jens Deppe
- */
-public class ChartManager {
-
-  static final boolean MMTEST = true;
-
-  private Map<Integer, VSDChartWindow> charts = new HashMap<>();
-
-  private static ChartManager instance = new ChartManager();
-
-  private RootController root;
-
-  private int chartId = 0;
-
-  private ChartManager() {
-    // We are a singleton
-  }
-
-  public static ChartManager getInstance() {
-    return instance;
-  }
-
-  public VSDChartWindow add(VSDChartWindow chart) {
-    return chart;
-  }
-
-  public VSDChartWindow get(String chartName) {
-    return charts.get(chartName);
-  }
-
-  public void setRootController(RootController root) {
-    this.root = root;
-  }
-
-  public void removeChart(int id) {
-    charts.remove(id);
-    root.setChartList(charts.keySet());
-  }
-
-  public int newChart(StatArchiveFile.StatValue sv) throws IOException {
-    int id = chartId++;
-
-    FXMLLoader loader = new FXMLLoader(getClass().getResource("/chart.fxml"));
-    Pane chartPane = loader.load();
-    Stage stage = new Stage();
-    Scene scene = new Scene(chartPane);
-    scene.getStylesheets().add("META-INF/css/style.css");
-    stage.setScene(scene);
-    stage.show();
-
-    VSDChartWindow controller = loader.getController();
-    controller.setId(id);
-    charts.put(id, controller);
-    root.setChartList(charts.keySet());
-
-    controller.setStage(stage);
-//    if (!MMTEST) {
-      controller.addToChart(sv);
-//    }
-
-    return id;
-  }
-
-  public void addToChart(int id, StatArchiveFile.StatValue sv) throws IOException {
-    charts.get(id).addToChart(sv);
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8a86c01a/jvsdfx-mm/src/main/java/org/apache/geode/jvsd/fx/HoveredThresholdNode.java
----------------------------------------------------------------------
diff --git a/jvsdfx-mm/src/main/java/org/apache/geode/jvsd/fx/HoveredThresholdNode.java b/jvsdfx-mm/src/main/java/org/apache/geode/jvsd/fx/HoveredThresholdNode.java
deleted file mode 100644
index dab61c3..0000000
--- a/jvsdfx-mm/src/main/java/org/apache/geode/jvsd/fx/HoveredThresholdNode.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.geode.jvsd.fx;
-
-import javafx.scene.Cursor;
-import javafx.scene.control.Label;
-import javafx.scene.layout.StackPane;
-
-public class HoveredThresholdNode extends StackPane {
-  public HoveredThresholdNode(String labelString) {
-    setPrefSize(2, 2);
-
-    final Label label = createDataThresholdLabel(labelString);
-
-    setOnMouseEntered(mouseEvent -> {
-      getChildren().setAll(label);
-      setCursor(Cursor.NONE);
-      toFront();
-    });
-    setOnMouseExited(mouseEvent -> {
-      getChildren().clear();
-      setCursor(Cursor.CROSSHAIR);
-    });
-  }
-
-  private Label createDataThresholdLabel(String labelString) {
-    final Label label = new Label(labelString);
-    // TODO style, colors, etc.
-    label.getStyleClass().addAll("chart-line-symbol", "chart-series-line");
-    label.setStyle("-fx-font-size: 8pt;");
-
-    label.setMinSize(Label.USE_PREF_SIZE, Label.USE_PREF_SIZE);
-    return label;
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8a86c01a/jvsdfx-mm/src/main/java/org/apache/geode/jvsd/fx/LongDoubleMemoryMappedSeries.java
----------------------------------------------------------------------
diff --git a/jvsdfx-mm/src/main/java/org/apache/geode/jvsd/fx/LongDoubleMemoryMappedSeries.java b/jvsdfx-mm/src/main/java/org/apache/geode/jvsd/fx/LongDoubleMemoryMappedSeries.java
deleted file mode 100644
index ee7be7b..0000000
--- a/jvsdfx-mm/src/main/java/org/apache/geode/jvsd/fx/LongDoubleMemoryMappedSeries.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.geode.jvsd.fx;
-
-import java.nio.ByteBuffer;
-
-import org.apache.geode.jvsd.javafx.scene.chart.ByteBufferNumberSeries;
-
-import com.pivotal.javafx.scene.chart.Data;
-
-import javafx.collections.ObservableList;
-
-/**
- * A named series of data items
- */
-public class LongDoubleMemoryMappedSeries extends ByteBufferNumberSeries<Number, Number> {
-
-  // -------------- CONSTRUCTORS ----------------------------------------------
-
-  /**
-   * Construct a empty series
-   */
-  public LongDoubleMemoryMappedSeries() {
-    super();
-  }
-
-  /**
-   * Constructs a Series and populates it with the given {@link ObservableList}
-   * data.
-   *
-   * @param data
-   *          ObservableList of MultiAxisChart.Data
-   */
-  public LongDoubleMemoryMappedSeries(ByteBuffer buffer) {
-    super(buffer);
-  }
-
-  /**
-   * Constructs a named Series and populates it with the given
-   * {@link ObservableList} data.
-   *
-   * @param name
-   *          a name for the series
-   * @param data
-   *          ObservableList of MultiAxisChart.Data
-   */
-  public LongDoubleMemoryMappedSeries(String name, ByteBuffer buffer) {
-    super(name, buffer);
-  }
-
-  // BEGIN FORMAT SPECIFIC
-  private static final int DATA_X_OFFSET = 0;
-  private static final int DATA_X_LENGTH = 8;
-  private static final int DATA_Y_OFFSET = DATA_X_OFFSET + DATA_X_LENGTH;
-  private static final int DATA_Y_LENGTH = 8;
-  private static final int DATA_WIDTH = DATA_Y_OFFSET + DATA_Y_LENGTH;
-  
-  // TODO Make these Abstract
-  @Override
-  public int getDataSize() {
-    return getBuffer().limit() / DATA_WIDTH;
-  }
-  
-  // TODO Make these Abstract
-  private long getXRaw(final int index) {
-    return buffer.getLong(index * DATA_WIDTH + DATA_X_OFFSET);
-  }
-
-  // TODO Make these Abstract
-  private double getYRaw(final int index) {
-    return buffer.getDouble(index * DATA_WIDTH + DATA_Y_OFFSET);
-  }
-
-  // END FORMAT SPECIFIC
- 
-  @Override
-  final protected Data<Number,Number> createData(int index) {
-    return new Data<>(getXRaw(index), getYRaw(index));
-  };
-    
-  @Override
-  final protected Long convertX(final double x) {
-    return (long) x;
-  }
-  
-  @Override
-  final protected Double convertY(final double y) {
-    return y;
-  }
-
-  @Override
-  final protected double getX(final int index) {
-    return (double) getXRaw(index);
-  };
-
-  @Override
-  final protected double getY(final int index) {
-    return (double) getYRaw(index);
-  }
-
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8a86c01a/jvsdfx-mm/src/main/java/org/apache/geode/jvsd/fx/Main.java
----------------------------------------------------------------------
diff --git a/jvsdfx-mm/src/main/java/org/apache/geode/jvsd/fx/Main.java b/jvsdfx-mm/src/main/java/org/apache/geode/jvsd/fx/Main.java
deleted file mode 100644
index 28f9af6..0000000
--- a/jvsdfx-mm/src/main/java/org/apache/geode/jvsd/fx/Main.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.geode.jvsd.fx;
-
-import javafx.application.Application;
-import javafx.fxml.FXMLLoader;
-import javafx.scene.Scene;
-import javafx.scene.layout.Pane;
-import javafx.stage.Stage;
-
-import java.io.IOException;
-
-import org.apache.geode.jvsd.controller.RootController;
-
-/**
- * @author Jens Deppe
- */
-public class Main extends Application {
-
-  private Stage primaryStage;
-
-  private RootController controller;
-
-  @Override
-  public void start(Stage stage) throws IOException {
-    primaryStage = stage;
-    primaryStage.setTitle("jVSD");
-
-    FXMLLoader loader = new FXMLLoader(getClass().getResource("/jvsd.fxml"));
-    Pane rootLayout = loader.load();
-
-    Scene scene = new Scene(rootLayout);
-    scene.getStylesheets().add("/jvsd.css");
-
-    controller = loader.getController();
-
-    ChartManager.getInstance().setRootController(controller);
-
-    primaryStage.setScene(scene);
-    primaryStage.show();
-  }
-
-  public static void main(String[] args) throws IOException {
-    StatFileManager.getInstance().add(args);
-    launch(args);
-  } 
-}
-

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8a86c01a/jvsdfx-mm/src/main/java/org/apache/geode/jvsd/fx/ObservableByteBuffer.java
----------------------------------------------------------------------
diff --git a/jvsdfx-mm/src/main/java/org/apache/geode/jvsd/fx/ObservableByteBuffer.java b/jvsdfx-mm/src/main/java/org/apache/geode/jvsd/fx/ObservableByteBuffer.java
deleted file mode 100644
index a68db32..0000000
--- a/jvsdfx-mm/src/main/java/org/apache/geode/jvsd/fx/ObservableByteBuffer.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.geode.jvsd.fx;
-
-public class ObservableByteBuffer {
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8a86c01a/jvsdfx-mm/src/main/java/org/apache/geode/jvsd/fx/ObservableDataBuffer.java
----------------------------------------------------------------------
diff --git a/jvsdfx-mm/src/main/java/org/apache/geode/jvsd/fx/ObservableDataBuffer.java b/jvsdfx-mm/src/main/java/org/apache/geode/jvsd/fx/ObservableDataBuffer.java
deleted file mode 100644
index 9f24715..0000000
--- a/jvsdfx-mm/src/main/java/org/apache/geode/jvsd/fx/ObservableDataBuffer.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.geode.jvsd.fx;
-
-import javafx.collections.ObservableListBase;
-
-import com.pivotal.javafx.scene.chart.Data;
-
-public class ObservableDataBuffer<X, Y> extends ObservableListBase<Data<X, Y>> {
-
-  @Override
-  public Data<X, Y> get(int index) {
-    // TODO Auto-generated method stub
-    return null;
-  }
-  
-  @Override
-  public boolean add(Data<X, Y> e) {
-    
-    
-    return true;
-  }
-
-  @Override
-  public int size() {
-    // TODO Auto-generated method stub
-    return 0;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8a86c01a/jvsdfx-mm/src/main/java/org/apache/geode/jvsd/fx/StatFileManager.java
----------------------------------------------------------------------
diff --git a/jvsdfx-mm/src/main/java/org/apache/geode/jvsd/fx/StatFileManager.java b/jvsdfx-mm/src/main/java/org/apache/geode/jvsd/fx/StatFileManager.java
deleted file mode 100644
index cae2be9..0000000
--- a/jvsdfx-mm/src/main/java/org/apache/geode/jvsd/fx/StatFileManager.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.geode.jvsd.fx;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.geode.jvsd.model.stats.StatArchiveFile;
-
-/**
- * Basic container for all stat files we are managing.
- *
- * @author Jens Deppe
- */
-public class StatFileManager {
-
-  private List<StatArchiveFile> statFiles = new ArrayList<>();
-
-  private static StatFileManager instance = new StatFileManager();
-
-  private StatFileManager() {
-    // We are a singleton
-  }
-
-  public static StatFileManager getInstance() {
-    return instance;
-  }
-
-  public void add(String[] fileNames) throws IOException {
-    for (String name : fileNames) {
-      statFiles.add(new StatArchiveFile(name));
-    }
-  }
-  
-  public void add(String fileName) throws IOException {
-      statFiles.add(new StatArchiveFile(fileName));
-  }
-
-  public List<StatArchiveFile> getArchives() {
-    return statFiles;
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8a86c01a/jvsdfx-mm/src/main/java/org/apache/geode/jvsd/fx/VSDChartWindow.java
----------------------------------------------------------------------
diff --git a/jvsdfx-mm/src/main/java/org/apache/geode/jvsd/fx/VSDChartWindow.java b/jvsdfx-mm/src/main/java/org/apache/geode/jvsd/fx/VSDChartWindow.java
deleted file mode 100644
index 40d0474..0000000
--- a/jvsdfx-mm/src/main/java/org/apache/geode/jvsd/fx/VSDChartWindow.java
+++ /dev/null
@@ -1,288 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.geode.jvsd.fx;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.RandomAccessFile;
-import java.net.URL;
-import java.nio.MappedByteBuffer;
-import java.nio.channels.FileChannel;
-import java.text.DateFormat;
-import java.text.NumberFormat;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.ResourceBundle;
-
-import javafx.beans.binding.Bindings;
-import javafx.collections.FXCollections;
-import javafx.fxml.FXML;
-import javafx.fxml.Initializable;
-import javafx.geometry.Side;
-import javafx.scene.chart.Axis;
-import javafx.scene.chart.NumberAxis;
-import javafx.scene.control.Button;
-import javafx.scene.control.Label;
-import javafx.scene.layout.Pane;
-import javafx.stage.Stage;
-
-import org.apache.geode.jvsd.chart.AdvancedLineChart;
-import org.apache.geode.jvsd.javafx.scene.chart.DateAxis;
-import org.apache.geode.jvsd.model.stats.StatArchiveFile.StatValue;
-import org.apache.geode.jvsd.stats.Utility;
-
-import com.pivotal.javafx.scene.chart.BasicSeries;
-import com.pivotal.javafx.scene.chart.Data;
-
-/**
- * An advanced line chart with a variety of actions and settable properties.
- *
- * @see javafx.scene.chart.LineChart
- * @see javafx.scene.chart.Chart
- * @see javafx.scene.chart.NumberAxis
- * @see javafx.scene.chart.XYChart
- */
-public class VSDChartWindow implements Initializable {
-
-  private int chartId;
-
-  private Stage stage;
-
-  private AdvancedLineChart<Number, Number> chart;
-
-  private ChartManager manager = ChartManager.getInstance();
-
-  @FXML
-  private Pane root;
-
-  @FXML
-  private Button resetButton;
-
-  @FXML
-  private Label coordLabel;
-
-  public void setStage(Stage stage) {
-    this.stage = stage;
-    this.stage.setOnCloseRequest(eh -> {
-      manager.removeChart(chartId);
-    });
-  }
-
-  public void setId(int chartId) {
-    this.chartId = chartId;
-  }
-
-  @Override
-  public void initialize(URL url, ResourceBundle resourceBundle) {
-    chart = createChart(root);
-    root.getChildren().add(chart);
-
-    // TODO better way to do this?
-    coordLabel.textProperty().bind(Bindings.format("%s x %s",
-        Bindings.createStringBinding(() -> DateFormat.getInstance().format(
-                chart.getXAxis().getValueForDisplay(
-                    chart.crosshairXProperty().doubleValue())),
-            chart.crosshairXProperty()),
-        Bindings.createStringBinding(() -> {
-          final NumberFormat formatter = NumberFormat.getInstance();
-          formatter.setGroupingUsed(true);
-          return formatter.format(
-              chart.getPrimaryYAxis().getValueForDisplay(
-                  chart.crosshairYProperty().doubleValue()));
-        }, chart.crosshairYProperty(), chart.primaryYAxisProperty())));
-  }
-
-  @FXML
-  private void resetRangeClicked() {
-    chart.getXAxis().setAutoRanging(true);
-    for (Axis<Number> yAxis : chart.getYAxes()) {
-      yAxis.setAutoRanging(true);
-    }
-  }
-
-  protected AdvancedLineChart<Number, Number> createChart(Pane root) {
-    final DateAxis xAxis = new DateAxis();
-    xAxis.setAutoRanging(true);
-    final NumberAxis yAxis = new NumberAxis();
-    final AdvancedLineChart<Number, Number> lc =
-        new AdvancedLineChart<>(xAxis, yAxis);
-    lc.setCreateSymbols(false);
-    lc.prefWidthProperty().bind(root.widthProperty());
-    lc.prefHeightProperty().bind(root.heightProperty());
-
-    if (ChartManager.MMTEST) {
-//    
-//    try (final RandomAccessFile memoryMappedFile = new RandomAccessFile("/tmp/test.vsd.stat1.vss", "rw")) {
-//
-//      final MappedByteBuffer in = memoryMappedFile.getChannel().map(FileChannel.MapMode.READ_ONLY, 0, memoryMappedFile.length());
-////      in.limit(1000000);
-//      final LongDoubleMemoryMappedSeries s = new LongDoubleMemoryMappedSeries(in);
-//      lc.getData().add(s);
-//
-////      Timeline animation = new Timeline();
-////      animation.getKeyFrames().add(new KeyFrame(Duration.seconds(1), actionEvent -> {
-////          in.limit(in.limit()+16);
-////          System.out.println(in.limit());
-//////          lc.toFront();
-//////          Data<Number, Number> last = s.getData().get(s.getData().size() - 1);
-//////          s.getData().add(new Data<>(last.getXValue().longValue() + 1000, last.getYValue().doubleValue() + (new Random().nextDouble() * 1000) - 500));
-////        
-////      }));
-////     animation.setCycleCount(Animation.INDEFINITE);
-////     animation.play();
-//      
-//
-//    } catch (FileNotFoundException e) {
-//      // TODO Auto-generated catch block
-//      e.printStackTrace();
-//    } catch (IOException e) {
-//      // TODO Auto-generated catch block
-//      e.printStackTrace();
-//    }
-    
-    }
-
-//  lc.getData().add(new LongDoubleFileSeries(new File("/tmp/test.vsd.stat1.vss")));
-
-    return lc;
-  }
-
-  public void addToChart(StatValue sv) {
-    if (!stage.titleProperty().isBound()) {
-      stage.setTitle(
-          "Chart" + chartId + "_" + sv.getDescriptor().getName());
-    }
-
-    Axis<Number> yAxis;
-    final String units = sv.getDescriptor().getUnits();
-    yAxis = findOrCreateYAxis(units);
-
-    final long[] timestamps = sv.getRawAbsoluteTimeStamps();
-    final double[] values = sv.getRawSnapshots();
-
-    long timeSampleAverage = Utility.computeTimeSampleAverage(timestamps);
-    long samplePeriod = timeSampleAverage / 1000;
-
-    final List<Data<Number, Number>> data; 
-    switch (sv.getFilter()) {
-    case StatValue.FILTER_NONE:
-      data = doFilterNone(samplePeriod, timestamps, values);
-      break;
-    case StatValue.FILTER_PERSEC:
-      data = doFilterPerSec(samplePeriod, timestamps, values);
-      break;
-    default:
-      data = null;
-    }
-
-    // add series data
-    if (ChartManager.MMTEST) {
-      addToChartMM(sv, yAxis, data);
-    } else {
-      BasicSeries<Number, Number> series = new BasicSeries<>(FXCollections.observableList(data));
-      series.setYAxis(yAxis);
-      series.setName(sv.getDescriptor().getName());
-      chart.getData().add(series);
-    }
-  }
-
-  private void addToChartMM(StatValue sv, Axis<Number> yAxis, List<Data<Number, Number>> data) {
-    try {
-      final File tmp = File.createTempFile(sv.getDescriptor().getName(), ".vss");
-      tmp.deleteOnExit();
-      
-      try (final RandomAccessFile memoryMappedFile = new RandomAccessFile(tmp, "rw")) {
-        final MappedByteBuffer out = memoryMappedFile.getChannel().map(FileChannel.MapMode.READ_WRITE, 0, data.size() * 16);
-
-        for (Data<Number, Number> d : data) {
-          out.putLong(d.getXValue().longValue());
-          out.putDouble(d.getYValue().doubleValue());
-        }
-        out.force();
-
-        final LongDoubleMemoryMappedSeries s = new LongDoubleMemoryMappedSeries(out);
-        s.setYAxis(yAxis);
-        s.setName(sv.getDescriptor().getName());
-        chart.getData().add(s);
-      }
-    } catch (IOException e) {
-      // TODO Auto-generated catch block
-      e.printStackTrace();
-    }
-  }
-
-  protected List<Data<Number, Number>> doFilterNone(long samplePeriod, final long[] timestamps, final double[] values) {
-    final ArrayList<Data<Number, Number>> list = new ArrayList<>(timestamps.length - 1);
-    
-    // skip first value to calc value/s.
-    for (int i = 1; i < timestamps.length; i++) {
-      final Data<Number, Number> data = new Data<Number, Number>(timestamps[i], values[i]);
-
-//TODO speed up      data.setNode(new HoveredThresholdNode(numberFormat.format(values[i])));
-      list.add(data);
-    }
-    
-    return list;
-  }
-
-  protected List<Data<Number, Number>> doFilterPerSec(long samplePeriod, final long[] timestamps, final double[] values) {
-    final ArrayList<Data<Number, Number>> list = new ArrayList<>(timestamps.length - 1);
-
-    // skip first value to calc value/s.
-    for (int i = 1; i < timestamps.length; i++) {
-      final long timestamp = timestamps[i];
-      final double psValue = Utility.computePerSecondValue(timestamp, timestamps[i - 1], values[i], values[i - 1], samplePeriod);
-      final Data<Number, Number> data = new Data<Number, Number>(timestamp, psValue);
-
-//TODO speed up      data.setNode(new HoveredThresholdNode(numberFormat.format(psValue)));
-      list.add(data);
-    }
-    
-    return list;
-  }
-
-  private Axis<Number> findOrCreateYAxis(final String units) {
-    Axis<Number> yAxis = findYAxis(units);
-
-    if (null == yAxis) {
-      yAxis = new NumberAxis();
-      yAxis.setSide(Side.RIGHT);
-      chart.getYAxes().add(yAxis);
-    }
-
-    if (null == yAxis.getLabel()) {
-      yAxis.setLabel(units);
-    }
-
-    return yAxis;
-  }
-
-  private Axis<Number> findYAxis(final String units) {
-    for (Axis<Number> y : chart.getYAxes()) {
-      if (null == y.getLabel() || y.getLabel().equals(units)) {
-        return y;
-      }
-    }
-
-    return null;
-  }
-
-
-  public String getTitle() {
-    return stage.getTitle();
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8a86c01a/jvsdfx-mm/src/main/java/org/apache/geode/jvsd/fx/VsdSeries.java
----------------------------------------------------------------------
diff --git a/jvsdfx-mm/src/main/java/org/apache/geode/jvsd/fx/VsdSeries.java b/jvsdfx-mm/src/main/java/org/apache/geode/jvsd/fx/VsdSeries.java
deleted file mode 100644
index 25c8ef1..0000000
--- a/jvsdfx-mm/src/main/java/org/apache/geode/jvsd/fx/VsdSeries.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.geode.jvsd.fx;
-
-import java.nio.MappedByteBuffer;
-
-public class VsdSeries  {
-  // TODO concurrency
-  
-  private MappedByteBuffer buffer = null;
-  
-  private int length = 0;
-  
-  
-  
-  
-  public void addData(long time, double value) {
-    if (buffer.remaining() < 8) {
-      expandBuffer();
-    }
-    
-    buffer.putLong(time);
-    buffer.putDouble(value);
-    length++;
-    
-    // TODO notify change
-  }
-
-  public int getLength() {
-    return length;
-  }
-
-  private void expandBuffer() {
-    // TODO Auto-generated method stub
-    
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8a86c01a/jvsdfx-mm/src/main/java/org/apache/geode/jvsd/javafx/scene/chart/AbstractSeries.java
----------------------------------------------------------------------
diff --git a/jvsdfx-mm/src/main/java/org/apache/geode/jvsd/javafx/scene/chart/AbstractSeries.java b/jvsdfx-mm/src/main/java/org/apache/geode/jvsd/javafx/scene/chart/AbstractSeries.java
deleted file mode 100644
index 27bbeb0..0000000
--- a/jvsdfx-mm/src/main/java/org/apache/geode/jvsd/javafx/scene/chart/AbstractSeries.java
+++ /dev/null
@@ -1,289 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.geode.jvsd.javafx.scene.chart;
-
-import java.util.stream.Collectors;
-
-import javafx.beans.property.ObjectProperty;
-import javafx.beans.property.ReadOnlyObjectProperty;
-import javafx.beans.property.ReadOnlyObjectWrapper;
-import javafx.beans.property.SimpleObjectProperty;
-import javafx.beans.property.StringProperty;
-import javafx.beans.property.StringPropertyBase;
-import javafx.beans.value.ChangeListener;
-import javafx.beans.value.ObservableValue;
-import javafx.collections.ObservableList;
-import javafx.scene.Node;
-import javafx.scene.chart.Axis;
-
-import com.pivotal.javafx.scene.chart.Data;
-import com.pivotal.javafx.scene.chart.LegendItem;
-import com.pivotal.javafx.scene.chart.MultiAxisChart;
-import com.pivotal.javafx.scene.chart.Series;
-
-//import com.pivotal.com.sun.javafx.charts.LegendItem;
-
-/**
- * A named series of data items
- */
-public abstract class AbstractSeries<X extends Number,Y extends Number> implements Series<X, Y> {
-
-    // -------------- PRIVATE PROPERTIES ----------------------------------------
-
-    /** the style class for default color for this series */
-    protected String defaultColorStyleClass;
-
-    // TODO make property
-    @Override
-    public String getDefaultColorStyleClass() {
-      return defaultColorStyleClass;
-    }
-    
-    @Override
-    public void setDefaultColorStyleClass(String defaultColorStyleClass) {
-      this.defaultColorStyleClass = defaultColorStyleClass;
-    }
-
-//    // TODO remove
-//    protected Data<X,Y> begin = null; // start pointer of a data linked list.
-//    
-//    // TODO remove
-//    @Override
-//    public Data<X, Y> getBegin() {
-//      return begin;
-//    }
-//
-//    // TODO remove
-//    @Override
-//    public void setBegin(Data<X, Y> begin) {
-//      this.begin = begin;
-//    }
-
-    /*
-     * Next pointer for the next series. We maintain a linkedlist of the
-     * serieses  so even after the series is deleted from the list,
-     * we have a reference to it - needed by BarChart e.g.
-     */
-    // TODO remove
-    protected Series<X,Y> next = null;
-
-    // TODO remove
-    @Override
-    public Series<X, Y> getNext() {
-      return next;
-    }
-
-    // TODO remove
-    @Override
-    public void setNext(Series<X, Y> next) {
-      this.next = next;
-    }
-
-
-    // -------------- PUBLIC PROPERTIES ----------------------------------------
-
-    /** Reference to the chart this series belongs to */
-    private final ReadOnlyObjectWrapper<MultiAxisChart<X, Y>> chart = new ReadOnlyObjectWrapper<MultiAxisChart<X, Y>>(this, "chart");
-
-    /* (non-Javadoc)
-     * @see com.pivotal.javafx.scene.chart.Series#getChart()
-     */
-    @Override
-    public final MultiAxisChart<X,Y> getChart() { return chart.get(); }
-    @Override
-    public void setChart(MultiAxisChart<X,Y> value) { chart.set(value); }
-    /* (non-Javadoc)
-     * @see com.pivotal.javafx.scene.chart.Series#chartProperty()
-     */
-    @Override
-    public final ReadOnlyObjectProperty<MultiAxisChart<X,Y>> chartProperty() { return chart.getReadOnlyProperty(); }
-
-    /** Reference to the Y Axis this chart belongs to */
-    private final ReadOnlyObjectWrapper<Axis<Y>> yAxis = new ReadOnlyObjectWrapper<Axis<Y>>(null, "yAxis") {
-      protected void invalidated() {
-        final Axis<Y> axis = get();
-        axis.autoRangingProperty().addListener(new ChangeListener<Boolean>() {
-          @Override
-          public void changed(ObservableValue<? extends Boolean> observable, Boolean oldValue, Boolean newValue) {
-            if (newValue) {
-              // TODO keep lists in series changed listener?
-              axis.invalidateRange(getData().stream().map((Data<X,Y> d) -> d.getYValue()).collect(Collectors.toList()));
-            }
-          }
-        });
-      };
-    };
-    
-    /* (non-Javadoc)
-     * @see com.pivotal.javafx.scene.chart.Series#getYAxis()
-     */
-    @Override
-    public final Axis<Y> getYAxis() { return yAxis.get(); }
-    // TODO change axis event
-    /* (non-Javadoc)
-     * @see com.pivotal.javafx.scene.chart.Series#setYAxis(javafx.scene.chart.Axis)
-     */
-    @Override
-    public void setYAxis(Axis<Y> value) { yAxis.set(value); }
-    /* (non-Javadoc)
-     * @see com.pivotal.javafx.scene.chart.Series#yAxisProperty()
-     */
-    @Override
-    public final ReadOnlyObjectProperty<Axis<Y>> yAxisProperty() { return yAxis.getReadOnlyProperty(); }
-
-    /** Reference to the legend for this series */
-    private final ReadOnlyObjectWrapper<LegendItem> legendItem = new ReadOnlyObjectWrapper<>(null, "legendItem");
-    /* (non-Javadoc)
-     * @see com.pivotal.javafx.scene.chart.Series#getLegendItem()
-     */
-    @Override
-    public final LegendItem getLegendItem() { return legendItem.get(); }
-    
-    @Override
-    public  void setLegendItem(LegendItem value) { legendItem.set(value); }
-    /* (non-Javadoc)
-     * @see com.pivotal.javafx.scene.chart.Series#legendItemProperty()
-     */
-    @Override
-    public final ReadOnlyObjectProperty<LegendItem> legendItemProperty() { return legendItem.getReadOnlyProperty(); }
-
-    
-    /** The user displayable name for this series */
-    private final StringProperty name = new StringPropertyBase() {
-        @Override protected void invalidated() {
-            get(); // make non-lazy
-            // TODO: We don't have visibility to execute the method, check if there's another way to call updateLegend() and requestChartLayout() from outside of MultiAxisChart. 
-//             if(getChart() != null) getChart().seriesNameChanged();
-            if(getChart() != null) getChart().requestLayout();
-        }
-
-        @Override
-        public Object getBean() {
-            return AbstractSeries.this;
-        }
-
-        @Override
-        public String getName() {
-            return "name";
-        }
-    };
-    /* (non-Javadoc)
-     * @see com.pivotal.javafx.scene.chart.Series#getName()
-     */
-    @Override
-    public final String getName() { return name.get(); }
-    /* (non-Javadoc)
-     * @see com.pivotal.javafx.scene.chart.Series#setName(java.lang.String)
-     */
-    @Override
-    public final void setName(String value) { name.set(value); }
-    /* (non-Javadoc)
-     * @see com.pivotal.javafx.scene.chart.Series#nameProperty()
-     */
-    @Override
-    public final StringProperty nameProperty() { return name; }
-
-    /**
-     * The node to display for this series. This is created by the chart if it uses nodes to represent the whole
-     * series. For example line chart uses this for the line but scatter chart does not use it. This node will be
-     * set as soon as the series is added to the chart. You can then get it to add mouse listeners etc.
-     */
-    private ObjectProperty<Node> node = new SimpleObjectProperty<Node>(this, "node");
-    /* (non-Javadoc)
-     * @see com.pivotal.javafx.scene.chart.Series#getNode()
-     */
-    @Override
-    public final Node getNode() { return node.get(); }
-    /* (non-Javadoc)
-     * @see com.pivotal.javafx.scene.chart.Series#setNode(javafx.scene.Node)
-     */
-    @Override
-    public final void setNode(Node value) { node.set(value); }
-    /* (non-Javadoc)
-     * @see com.pivotal.javafx.scene.chart.Series#nodeProperty()
-     */
-    @Override
-    public final ObjectProperty<Node> nodeProperty() { return node; }
-
-
-    // -------------- CONSTRUCTORS ----------------------------------------------
-
-    /**
-     * Construct a empty series
-     */
-    public AbstractSeries() {
-    }
-
-    /**
-     * Constructs a named Series and populates it with the given {@link ObservableList} data.
-     *
-     * @param name a name for the series
-     * @param data ObservableList of MultiAxisChart.Data
-     */
-    public AbstractSeries(String name, ObservableList<Data<X,Y>> data) {
-        setName(name);
-    }
-
-    // -------------- PUBLIC METHODS ----------------------------------------------
-
-    /* (non-Javadoc)
-     * @see com.pivotal.javafx.scene.chart.Series#toString()
-     */ 
-    @Override public String toString() {
-        return "Series["+getName()+"]";
-    }
-
-    // -------------- PRIVATE/PROTECTED METHODS -----------------------------------
-
-    /*
-     * The following methods are for manipulating the pointers in the linked list
-     * when data is deleted. 
-     */
-//    @Override
-//    public void removeDataItemRef(Data<X,Y> item) {
-//        if (begin == item) {
-//            begin = item.next;
-//        } else {
-//            Data<X,Y> ptr = begin;
-//            while(ptr != null && ptr.next != item) {
-//                ptr = ptr.next;
-//            }
-//            if(ptr != null) ptr.next = item.next;
-//        }
-//    }
-
-    @Override
-    public int getItemIndex(Data<X,Y> item) {
-//        int itemIndex = 0;
-//        for (Data<X,Y> d = begin; d != null; d = d.next) {
-//            if (d == item) break;
-//            itemIndex++;
-//        }
-//        return itemIndex;
-      return getData().indexOf(item);
-    }
-
-    @Override
-    public int getDataSize() {
-//        int count = 0;
-//        for (Data<X,Y> d = begin; d != null; d = d.next) {
-//            count++;
-//        }
-//        return count;
-      return getData().size();
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8a86c01a/jvsdfx-mm/src/main/java/org/apache/geode/jvsd/javafx/scene/chart/BasicDataSet.java
----------------------------------------------------------------------
diff --git a/jvsdfx-mm/src/main/java/org/apache/geode/jvsd/javafx/scene/chart/BasicDataSet.java b/jvsdfx-mm/src/main/java/org/apache/geode/jvsd/javafx/scene/chart/BasicDataSet.java
deleted file mode 100644
index 3328328..0000000
--- a/jvsdfx-mm/src/main/java/org/apache/geode/jvsd/javafx/scene/chart/BasicDataSet.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.geode.jvsd.javafx.scene.chart;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.function.Predicate;
-import java.util.stream.Collectors;
-
-import com.pivotal.javafx.scene.chart.Data;
-
-import javafx.beans.InvalidationListener;
-
-public class BasicDataSet<X extends Number & Comparable<X>, Y extends Number & Comparable<Y>> implements DataSet<X, Y> {
-
-  protected final List<Data<X,Y>> list = new ArrayList<>();
-  
-  public void addData(final Data<X,Y> data) {
-    list.add(data);
-    
-    // TODO fire change;
-  }
-  
-  @Override
-  public List<Data<X, Y>> getData(final X from, final X to, final int limit) {
-    
-    List<Data<X, Y>> visible = list.stream().filter(new Predicate<Data<X,Y>>() {
-      @Override
-      public boolean test(Data<X, Y> item) {
-        final X x = item.getXValue();
-        return between(from, to, x);
-      }
-
-    }).collect(Collectors.toList());
-    
-    //System.out.println(getData().size() + " - " + visible.size());
-    
-    if (visible.size() > limit) {
-      visible = getVisibleDataSubsampled(visible, limit);
-    }
-    
-    return visible;
-  }
-  
-  private List<Data<X, Y>> getVisibleDataSubsampled(List<Data<X, Y>> data, int threshold) {
-    // Bucket size. Leave room for start and end data points
-    final int dataLength = data.size();
-    final double bucketSize = (double) (dataLength - 2) / (threshold - 2);
-    final ArrayList<Data<X,Y>> sampled = new ArrayList<>(threshold);
-
-    int a = 0; // Initially a is the first point in the triangle
-    int nextA = 0;
-
-    sampled.add(data.get(a)); // Always add the first point
-
-    for (int i = 0; i < threshold - 2; i++) {
-      // Calculate point average for next bucket (containing c)
-      double pointCX = 0;
-      double pointCY = 0;
-      int pointCStart = (int) Math.floor((i + 1) * bucketSize) + 1;
-      int pointCEnd = (int) Math.floor((i + 2) * bucketSize) + 1;
-      pointCEnd = pointCEnd < dataLength ? pointCEnd : dataLength;
-      final int pointCSize = pointCEnd - pointCStart;
-      for (; pointCStart < pointCEnd; pointCStart++) {
-        final Data<X, Y> item = data.get(pointCStart);
-        // TODO use the axis position? Don't have to assume number type then
-        pointCX += item.getXValue().doubleValue();
-        pointCY +=item.getYValue().doubleValue();
-      }
-      pointCX /= pointCSize;
-      pointCY /= pointCSize;
-
-      // Point a
-      final double pointAX;
-      final double pointAY;
-      {
-        final Data<X, Y> item = data.get(a);
-        pointAX = item.getXValue().doubleValue();
-        pointAY = item.getYValue().doubleValue();
-      }
-
-      // Get the range for bucket b
-      int pointBStart = (int) Math.floor((i + 0) * bucketSize) + 1;
-      final int pointBEnd = (int) Math.floor((i + 1) * bucketSize) + 1;
-      double maxArea = -1;
-      for (; pointBStart < pointBEnd; pointBStart++) {
-        // Calculate triangle area over three buckets
-        final Data<X, Y> item = data.get(pointBStart);
-        final double pointBX = item.getXValue().doubleValue();
-        final double pointBY = item.getYValue().doubleValue();
-        final double area = Math.abs((pointAX - pointCX) * (pointBY - pointAY) - (pointAX - pointBX)
-            * (pointCY - pointAY)) * 0.5;
-        if (area > maxArea) {
-          maxArea = area;
-          nextA = pointBStart; // Next a is this b
-        }
-      }
-
-     // Pick this point from the bucket
-      sampled.add(data.get(nextA)); 
-      a = nextA; // This a is the next a (chosen b)
-    }
-    
-    // Always add last
-    sampled.add(data.get(dataLength - 1));
-    
-    return sampled;
-  }
-
-  @Override
-  public void addListener(InvalidationListener listener) {
-    // TODO Auto-generated method stub
-
-  }
-
-  @Override
-  public void removeListener(InvalidationListener listener) {
-    // TODO Auto-generated method stub
-
-  }
-
-  @Override
-  public void addListener(DataChangedListener listener) {
-    // TODO Auto-generated method stub
-
-  }
-
-  @Override
-  public void removeListener(DataChangedListener listener) {
-    // TODO Auto-generated method stub
-
-  }
-
-  protected static <T extends Comparable<T>> boolean between(final T from, final T to, final T value) {
-    return from.compareTo(value) >= 0 && to.compareTo(value) <= 0;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8a86c01a/jvsdfx-mm/src/main/java/org/apache/geode/jvsd/javafx/scene/chart/ByteBufferNumberSeries.java
----------------------------------------------------------------------
diff --git a/jvsdfx-mm/src/main/java/org/apache/geode/jvsd/javafx/scene/chart/ByteBufferNumberSeries.java b/jvsdfx-mm/src/main/java/org/apache/geode/jvsd/javafx/scene/chart/ByteBufferNumberSeries.java
deleted file mode 100644
index 475334b..0000000
--- a/jvsdfx-mm/src/main/java/org/apache/geode/jvsd/javafx/scene/chart/ByteBufferNumberSeries.java
+++ /dev/null
@@ -1,450 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.geode.jvsd.javafx.scene.chart;
-
-import java.nio.ByteBuffer;
-import java.text.MessageFormat;
-import java.text.NumberFormat;
-import java.util.AbstractCollection;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.NoSuchElementException;
-
-import javafx.beans.property.ObjectProperty;
-import javafx.beans.property.SimpleObjectProperty;
-import javafx.collections.FXCollections;
-import javafx.collections.ObservableList;
-import javafx.scene.Node;
-import javafx.scene.chart.Axis;
-
-import org.apache.geode.jvsd.fx.HoveredThresholdNode;
-
-import com.pivotal.javafx.scene.chart.BasicSeries;
-import com.pivotal.javafx.scene.chart.Data;
-
-/**
- * A named series of data items
- */
-public abstract class ByteBufferNumberSeries<X extends Number, Y extends Number> extends BasicSeries<X, Y> {
-
-  // -------------- PUBLIC PROPERTIES ----------------------------------------
-
-  // TODO remove
-  /** ObservableList of data items that make up this series */
-  private final ObjectProperty<ByteBuffer> bufferProperty = new SimpleObjectProperty<ByteBuffer>() {
-    protected void invalidated() {
-      buffer = get();
-    }
-  };
-
-  // here for speed over getBuffer();
-  protected ByteBuffer buffer;
-
-  public final ByteBuffer getBuffer() {
-    return bufferProperty.get();
-  }
-
-  public final void setBuffer(ByteBuffer value) {
-    bufferProperty.setValue(value);
-  }
-
-  public final ObjectProperty<ByteBuffer> bufferProperty() {
-    return bufferProperty;
-  }
-
-//  // TODO remove
-//  /** ObservableList of data items that make up this series */
-//  private final ObjectProperty<ObservableList<Data<X, Y>>> data = new ObjectPropertyBase<ObservableList<Data<X, Y>>>() {
-//    @Override
-//    protected void invalidated() {
-//      // TODO update buffer, minX, maxX, etc.
-//    }
-//
-//    @Override
-//    public Object getBean() {
-//      return ByteBufferNumberSeries.this;
-//    }
-//
-//    @Override
-//    public String getName() {
-//      return "data";
-//    }
-//  };
-//
-//  /*
-//   * (non-Javadoc)
-//   * 
-//   * @see com.pivotal.javafx.scene.chart.Series#getData()
-//   */
-//  // TODO remove
-//  @Override
-//  public final ObservableList<Data<X, Y>> getData() {
-//    return data.getValue();
-//    // System.out.println("getData:");
-//    // return ;
-//  }
-//
-//  /*
-//   * (non-Javadoc)
-//   * 
-//   * @see
-//   * com.pivotal.javafx.scene.chart.Series#setData(javafx.collections.ObservableList
-//   * )
-//   */
-//  // TODO remove
-//  @Override
-//  public final void setData(ObservableList<Data<X, Y>> value) {
-//    data.setValue(value);
-//  }
-//
-//  /*
-//   * (non-Javadoc)
-//   * 
-//   * @see com.pivotal.javafx.scene.chart.Series#dataProperty()
-//   */
-//  // TODO remove
-//  @Override
-//  public final ObjectProperty<ObservableList<Data<X, Y>>> dataProperty() {
-//    return data;
-//  }
-
-  // -------------- CONSTRUCTORS ----------------------------------------------
-
-  /**
-   * Construct a empty series
-   */
-  public ByteBufferNumberSeries() {
-    super();
-    buffer = null;
-  }
-
-  /**
-   * Constructs a Series and populates it with the given {@link ObservableList}
-   * data.
-   *
-   * @param data
-   *          ObservableList of MultiAxisChart.Data
-   */
-  public ByteBufferNumberSeries(ByteBuffer buffer) {
-    super();
-    setBuffer(buffer);
-    //setData(FXCollections.observableArrayList(new Data(0, 1000000), new Data(10000000000000l, -100000)));
-    setData(FXCollections.observableArrayList(new ThresholdDataCollection(0, getDataSize(), 1000)));
-    
-  }
-
-  /**
-   * Constructs a named Series and populates it with the given
-   * {@link ObservableList} data.
-   *
-   * @param name
-   *          a name for the series
-   * @param data
-   *          ObservableList of MultiAxisChart.Data
-   */
-  public ByteBufferNumberSeries(String name, ByteBuffer buffer) {
-    this(buffer);
-    setName(name);
-  }
-
-  @Override
-  public Collection<Data<X, Y>> getVisibleData() {
-
-    final Axis<X> xAxis = getChart().getXAxis();
-    final double width = xAxis.getWidth();
-
-    final int end = getDataSize() - 1;
-
-    final double min = getX(0);
-    final double max = getX(end);
-
-    final double left = xAxis.getValueForDisplay(0).doubleValue();
-    final double right = xAxis.getValueForDisplay(width).doubleValue();
-
-    // find file position for first visible point
-    int first;
-    if (left <= min) {
-      first = 0;
-    } else if (left >= max) {
-      first = end;
-    } else {
-      // time series should be linear on x, so guess file position and scan
-      first = (int) (((left - min) / (max - min)) * end);
-      if (getX(first) < left) {
-        first = findFirst(first + 1, left) - 1;
-      } else {
-        first = findLast(first - 1, left);
-      }
-    }
-
-    // find file position for last visible point
-    int last;
-    if (right <= min) {
-      last = 0;
-    } else if (right >= max) {
-      last = end;
-    } else {
-      // time series should be linear on x, so guess file position and scan
-      last = (int) (((right - min) / (max - min)) * end);
-      if (getX(last) < right) {
-        last = findFirst(last + 1, right);
-      } else {
-        last = findLast(last - 1, right) + 1;
-      }
-    }
-
-    // fit threshold to series width
-    int threshold = (int) width;
-    if (left < min || right > max) {
-      // there is space on either/both ends so adjust the threshold
-      threshold = Math.max((int) (xAxis.getDisplayPosition(convertX(Math.min(right, max))) - xAxis.getDisplayPosition(convertX(Math.max(left, min)))), 3);
-    }
-    
-    // using 2 times the width makes it look a little smoother. Consider dynamic bucket size algorithm.
-    // you can still seem some points blink in and out on zoom and pan
-    // maybe used fixed points for bucket boundaries, first/last buckets will shrink by first/last data position
-    final Collection<Data<X, Y>> v = new ThresholdDataCollection(first, last - first + 1, threshold);
-
-    return v;
-  }
-
-
-
-  protected Data<X, Y> getData(final int index) {
-    Data<X, Y> data = createData(index);
-    data.setNode(createSymbol(data));
-    return data;
-  }
-  
-  
-  private Node createSymbol(Data<X, Y> data) {
-    return new HoveredThresholdNode(NumberFormat.getNumberInstance().format(data.getYValue()));
-  }
-
-
-  // TODO Make these Abstract
-  @Override
-  public abstract int getDataSize();
-
-  protected abstract Data<X,Y> createData(final int index);
-
-  protected abstract double getX(final int index);
-
-  protected abstract X convertX(double x);
-
-  protected abstract double getY(final int index);
-
-  protected abstract Y convertY(double y);
-
-  protected int findFirst(final int start, final double left) {
-    // TODO improve over scan? since likely linear chances are we hit on first try.
-    for (int i = start; i < getDataSize(); i++) {
-      if (getX(i) > left) {
-//        System.out.println("f: " + (i - start));
-        return i;
-      }
-    }
-
-    return -1;
-  }
-
-  protected int findLast(final int start, final double right) {
-    // TODO improve over scan? since likely linear chances are we hit on first try.
-    for (int i = start; i >= 0; i--) {
-      if (getX(i) < right) {
-//        System.out.println("l: " + (start - i));
-        return i;
-      }
-    }
-
-    return getDataSize() - 1;
-  }
-
-  protected class ThresholdDataCollection extends AbstractCollection<Data<X, Y>> {
-    final int offset;
-    final int length;
-    final int threshold;
-    final int size;
-
-    public ThresholdDataCollection(final int offset, final int length, final int threshold) {
-      this.offset = offset;
-      this.length = length;
-      this.threshold = threshold;
-      this.size = Math.min(length, (int) threshold);
-
-      System.out.println(MessageFormat.format("ThresholdDataCollection: offset={0}, length={1}, threshold={2}, end={3}", offset, length, threshold, offset + length));
-    }
-
-    @Override
-    public Iterator<Data<X, Y>> iterator() {
-      if (length > threshold) {
-        return createDownsampleVisibleIterator();
-      } else {
-        return createVisibleIterator();
-      }
-    }
-
-    @Override
-    public int size() {
-      return size;
-    }
-
-    protected Iterator<Data<X, Y>> createVisibleIterator() {
-      return new VisibleIterator();
-    }
-
-    protected Iterator<Data<X, Y>> createDownsampleVisibleIterator() {
-      return new DownsampleVisibleIterator();
-    }
-
-    protected abstract class AbstractDataIterator implements Iterator<Data<X, Y>> {
-      int index = offset;
-      Data<X, Y> next = null;
-      
-      protected abstract void advance();
-
-      protected Data<X, Y> consume() {
-        final Data<X, Y> data = next;
-        next = null;
-        return data;
-      }
-
-      @Override
-      public boolean hasNext() {
-        advance();
-        return (null != next);
-      }
-
-      @Override
-      public Data<X, Y> next() {
-        if (!hasNext()) {
-          throw new NoSuchElementException();
-        }
-
-        return consume();
-      }
-
-    }
-    
-    protected class VisibleIterator extends AbstractDataIterator {
-      
-       
-      @Override
-      protected void advance() {
-        if (null != next) {
-          return;
-        }
-
-        if (index >= (offset + length)) {
-          return;
-        }
-
-        next = getData(index);
-        index++;
-      }
-    }
-
-    protected class DownsampleVisibleIterator extends AbstractDataIterator {
-      // Bucket size. Leave room for start and end data points
-      final double bucketSize = (double) (length - 2) / (threshold - 2);
-
-      int bucket = 0;
-      int a = index; // Initially a is the first point in the triangle
-
-      public DownsampleVisibleIterator() {
-        super();
-
-        System.out.println(MessageFormat.format("DownsampleVisibleIterator: bucketSize={0}", bucketSize));
-      }
-
-      @Override
-      protected void advance() {
-        // TODO when zooming out bound to visible width not chart width
-        if (null != next) {
-          return;
-        }
-
-        if (index >= (offset + length)) {
-          return;
-        }
-
-//         final long start = System.nanoTime();
-//         try {
-
-        if (offset == index) {
-          // Always add the first point
-          next = getData(index);
-          index++;
-          return;
-        }
-
-        if (bucket < threshold - 2) {
-          // final long start2 = System.nanoTime();
-          // Calculate point average for next bucket (containing c)
-          double pointCX = 0;
-          double pointCY = 0;
-          int pointCStart = (int) Math.floor((bucket + 1) * bucketSize) + offset + 1;
-          int pointCEnd = (int) Math.floor((bucket + 2) * bucketSize) + offset + 1;
-          pointCEnd = Math.min(pointCEnd, (offset + length));
-          final int pointCSize = pointCEnd - pointCStart;
-          for (; pointCStart < pointCEnd; pointCStart++) {
-            pointCX += getX(pointCStart);
-            pointCY += getY(pointCStart);
-          }
-          pointCX /= pointCSize;
-          pointCY /= pointCSize;
-          // System.out.println("time2: " + (System.nanoTime() - start2));
-
-          // Point a
-          // TODO cache?
-          final double pointAX = getX(a);
-          final double pointAY = getY(a);
-
-          // Get the range for bucket b
-          int pointBStart = (int) Math.floor((bucket + 0) * bucketSize) + offset + 1;
-          final int pointBEnd = (int) Math.floor((bucket + 1) * bucketSize) + offset + 1;
-          double maxArea = -1;
-          for (; pointBStart < pointBEnd; pointBStart++) {
-            index++;
-            // Calculate triangle area over three buckets
-            final double area = Math.abs((pointAX - pointCX) * (getY(pointBStart) - pointAY) - (pointAX - getX(pointBStart))
-                * (pointCY - pointAY)) * 0.5;
-            if (area > maxArea) {
-              maxArea = area;
-              a = pointBStart; // Next a is this b
-            }
-          }
-
-          // Pick this point from the bucket
-          next = getData(a);
-          bucket++;
-          return;
-        }
-
-        // Always add last
-        assert ((offset + length - 1) == index);
-        next = getData(index);
-        index++;
-//         } finally {
-//         System.out.println(MessageFormat.format("DownsampleVisibleIterator: bucket={0}, time={1}ms",
-//         bucket, ((double) System.nanoTime() - start) / 1000000));
-//         }
-      }
-    }
-
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8a86c01a/jvsdfx-mm/src/main/java/org/apache/geode/jvsd/javafx/scene/chart/DataChangedListener.java
----------------------------------------------------------------------
diff --git a/jvsdfx-mm/src/main/java/org/apache/geode/jvsd/javafx/scene/chart/DataChangedListener.java b/jvsdfx-mm/src/main/java/org/apache/geode/jvsd/javafx/scene/chart/DataChangedListener.java
deleted file mode 100644
index c88696e..0000000
--- a/jvsdfx-mm/src/main/java/org/apache/geode/jvsd/javafx/scene/chart/DataChangedListener.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.geode.jvsd.javafx.scene.chart;
-
-public interface DataChangedListener {
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8a86c01a/jvsdfx-mm/src/main/java/org/apache/geode/jvsd/javafx/scene/chart/DataSet.java
----------------------------------------------------------------------
diff --git a/jvsdfx-mm/src/main/java/org/apache/geode/jvsd/javafx/scene/chart/DataSet.java b/jvsdfx-mm/src/main/java/org/apache/geode/jvsd/javafx/scene/chart/DataSet.java
deleted file mode 100644
index c234761..0000000
--- a/jvsdfx-mm/src/main/java/org/apache/geode/jvsd/javafx/scene/chart/DataSet.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.geode.jvsd.javafx.scene.chart;
-
-import java.util.List;
-
-import com.pivotal.javafx.scene.chart.Data;
-
-public interface DataSet<X, Y> extends javafx.beans.Observable {
-  public List<Data<X, Y>> getData(X from, X to, int limit);
-
-  public void addListener(DataChangedListener listener);
-
-  public void removeListener(DataChangedListener listener);
-}


Mime
View raw message