Package com.seyren.core.service.live

Examples of com.seyren.core.service.live.Metric


    private static class PythonToJava implements Function<Object, Metric> {
        @Override
        public Metric apply(Object pyObject) {
            PyTuple pyTuple = (PyTuple) pyObject;
            Metric metric = new Metric();
            metric.setName(pyTuple.get(0).toString());
            PyTuple data = ((PyTuple) pyTuple.get(1));
            metric.setTimestamp(new Date(((Number) data.get(0)).longValue() * 1000));
            metric.setValue(new BigDecimal(((Number) data.get(1)).doubleValue()));
            return metric;
        }
View Full Code Here

TOP

Related Classes of com.seyren.core.service.live.Metric

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.