Package com.rackspacecloud.blueflood.exceptions

Examples of com.rackspacecloud.blueflood.exceptions.SerializationException


        public CounterRollup fromByteBuffer(ByteBuffer byteBuffer) {
            CodedInputStream in = CodedInputStream.newInstance(byteBuffer.array());
            try {
                byte version = in.readRawByte();
                if (version != VERSION_1_COUNTER_ROLLUP)
                    throw new SerializationException(String.format("Unexpected serialization version: %d", (int)version));
                return deserializeV1CounterRollup(in);
            } catch (Exception ex) {
                throw new RuntimeException(ex);
            }
        }
View Full Code Here


        } else if (point.getData() instanceof CounterRollup) {
            CounterRollup rollup = (CounterRollup)point.getData();
            numPoints += rollup.getCount().longValue();
            filterStatsObject = getFilteredStatsForRollup(rollup, filterStats);
        } else {
            throw new SerializationException("Unsupported data type for Point");
        }

        // Set all filtered stats to null if numPoints is 0
        if (numPoints == 0) {
            final Set<Map.Entry<String, Object>> statsSet = filterStatsObject.entrySet();
View Full Code Here

    private JSONObject toJSON(long timestamp, Points.Point point, String unit) throws SerializationException {
        final JSONObject object = new JSONObject();
        object.put("timestamp", timestamp);

        if (!(point.getData() instanceof HistogramRollup)) {
            throw new SerializationException("Unsupported type. HistogramRollup expected.");
        }

        HistogramRollup histogramRollup = (HistogramRollup) point.getData();

        final JSONArray hist = new JSONArray();
View Full Code Here

TOP

Related Classes of com.rackspacecloud.blueflood.exceptions.SerializationException

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.