Package org.rhq.server.metrics.aggregation

Examples of org.rhq.server.metrics.aggregation.IndexIterator


        return configuration;
    }

    @Test
    public void iterateOverEmptyIndex() {
        IndexIterator iterator = new IndexIterator(hour(4), hour(5), IndexBucket.RAW, dao, configuration);

        assertFalse(iterator.hasNext());
    }
View Full Code Here


            newIndexEntry(IndexBucket.RAW, hour(5), 109),
            newIndexEntry(IndexBucket.RAW, hour(5), 111)
        );
        List<IndexEntry> actual = new ArrayList<IndexEntry>();

        IndexIterator iterator = new IndexIterator(hour(4), hour(6), IndexBucket.RAW, dao, configuration);

        while (iterator.hasNext()) {
            actual.add(iterator.next());
        }

        assertEquals(actual, expected, "The index entries do not match");
    }
View Full Code Here

            expected.add(new IndexEntry(bucket, (scheduleId % configuration.getIndexPartitions()), startTime,
                scheduleId));
        }

        List<IndexEntry> actual = new ArrayList<IndexEntry>();
        IndexIterator iterator = new IndexIterator(startTime, endTime, bucket, dao, configuration);
        while (iterator.hasNext()) {
            actual.add(iterator.next());
        }

        assertEquals(actual, expected, "The " + bucket + " index entries do not match");
    }
View Full Code Here

TOP

Related Classes of org.rhq.server.metrics.aggregation.IndexIterator

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.