Package org.rhq.core.domain.sync.entity

Examples of org.rhq.core.domain.sync.entity.MetricTemplate


        });

        MetricTemplateImporter importer =
            new MetricTemplateImporter(null, prereqs.getEntityManager(), prereqs.getMeasurementScheduleManager());

        MetricTemplate nonMatching = new MetricTemplate();
        nonMatching.setResourceTypeName("asf");
        nonMatching.setResourceTypePlugin("asfd");
        nonMatching.setMetricName("asf");
       
        MetricTemplate matching = new MetricTemplate(def);

        importer.configure(null);

        ExportedEntityMatcher<MeasurementDefinition, MetricTemplate> matcher = importer.getExportedEntityMatcher();
View Full Code Here


        importer.configure(null);

        ExportedEntityMatcher<MeasurementDefinition, MetricTemplate> matcher = importer.getExportedEntityMatcher();

        MetricTemplate match1 = new MetricTemplate(defToEnable);
        MetricTemplate match2 = new MetricTemplate(defToDisable);

        assertSame(matcher.findMatch(match1), defToEnable,
            "The matching metric template should have found the defined measurement definition");
        assertSame(matcher.findMatch(match2), defToDisable,
            "The matching metric template should have found the defined measurement definition");
View Full Code Here

        importer.configure(importConfig);

        ExportedEntityMatcher<MeasurementDefinition, MetricTemplate> matcher = importer.getExportedEntityMatcher();

        MetricTemplate template = new MetricTemplate(def);

        assertSame(matcher.findMatch(template), def,
            "The matching metric template should have found the defined measurement definition");

        importer.update(def, template);
View Full Code Here

        importer.configure(importConfig);

        ExportedEntityMatcher<MeasurementDefinition, MetricTemplate> matcher = importer.getExportedEntityMatcher();

        MetricTemplate template1 = new MetricTemplate(updatedDef);
        MetricTemplate template2 = new MetricTemplate(notUpdatedDef);

        assertSame(matcher.findMatch(template1), updatedDef,
            "The matching metric template should have found the defined measurement definition");
        assertSame(matcher.findMatch(template2), notUpdatedDef,
            "The matching metric template should have found the defined measurement definition");
View Full Code Here

        importer.configure(null);

        ExportedEntityMatcher<MeasurementDefinition, MetricTemplate> matcher = importer.getExportedEntityMatcher();

        MetricTemplate template1 = new MetricTemplate(normalDef);
        MetricTemplate template2 = new MetricTemplate(perMinuteDef);

        assertSame(matcher.findMatch(template1), normalDef,
            "The matching metric template should have found the defined measurement definition");
        assertSame(matcher.findMatch(template2), perMinuteDef,
            "The matching metric template should have found the defined measurement definition");
View Full Code Here

        importer.configure(null);

        importer.configure(null);

        MetricTemplate unmatched = new MetricTemplate();
        unmatched.setMetricName("made-up");
        unmatched.setResourceTypeName("made-up");
        unmatched.setResourceTypePlugin("made-up");

        ExportedEntityMatcher<MeasurementDefinition, MetricTemplate> matcher = importer.getExportedEntityMatcher();

        assertNull(matcher.findMatch(unmatched));
View Full Code Here

            return null;
        }

        @Override
        protected MetricTemplate convert(MeasurementDefinition object) {
            return new MetricTemplate(object);
        }
View Full Code Here

                Query q = entityManager.createQuery("SELECT md FROM MeasurementDefinition md");

                for (Object r : q.getResultList()) {
                    MeasurementDefinition md = (MeasurementDefinition) r;

                    cache.put(new MetricTemplate(md), md);
                }
               
            }
            @Override
            public MeasurementDefinition findMatch(MetricTemplate object) {
View Full Code Here

TOP

Related Classes of org.rhq.core.domain.sync.entity.MetricTemplate

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.