Package org.mc4j.ems.connection.bean.attribute

Examples of org.mc4j.ems.connection.bean.attribute.EmsAttribute.refresh()


            report.addData(new MeasurementDataNumeric(request, new Double(processed.doubleValue())));
          } else if (metricName.equals(OVERALL_BYTES_FAILED_METRIC)) {
            EmsAttribute attribute = getEmsBean().getAttribute(OVERALL_BYTES_FAILED);
            Long processed = new Long(0);
            if (attribute != null) {
              processed = (Long) attribute.refresh();
              bytesFailed = processed.longValue();
            }
            report.addData(new MeasurementDataNumeric(request, new Double(processed.doubleValue())));           
          } else if (metricName.equals(OVERALL_BYTES_METRIC)) {
            EmsAttribute attribute = getEmsBean().getAttribute(OVERALL_BYTES_COUNT);
View Full Code Here


            report.addData(new MeasurementDataNumeric(request, new Double(processed.doubleValue())));           
          } else if (metricName.equals(OVERALL_BYTES_METRIC)) {
            EmsAttribute attribute = getEmsBean().getAttribute(OVERALL_BYTES_COUNT);
            Long processed = new Long(0);
            if (attribute != null) {
              processed = (Long) attribute.refresh();
            }
            report.addData(new MeasurementDataNumeric(request, new Double(processed.doubleValue())));
          }
        }
View Full Code Here

        EmsBean emsBean = loadBean(STORAGE_SERVICE_BEAN, emsConnection);
        if (emsBean != null) {
            EmsAttribute attribute = emsBean.getAttribute("Keyspaces");
            if (attribute != null) {
                value = (List<Object>) attribute.refresh();
            }
        }

        if (value == null) {
            value = new ArrayList<Object>();
View Full Code Here

            String metricName = request.getName();
            try {
                EmsAttribute atribute = detailComponent.getAttribute(metricName);

                Object value = atribute.refresh();

                if (value != null)
                    if (request.getDataType() == DataType.MEASUREMENT) {
                        Double number = ((Number) value).doubleValue();
                        report.addData(new MeasurementDataNumeric(request, number));
View Full Code Here

    }

    public PropertySimple getCommitLogProperty() {
        EmsBean emsBean = loadBean(KeyspaceService.STORAGE_SERVICE_BEAN);
        EmsAttribute attribute = emsBean.getAttribute("CommitLogLocation");
        return new PropertySimple("CommitLogLocation", attribute.refresh());
    }

    public boolean clearCommitLog() {
        PropertySimple commitLogProperty = this.getCommitLogProperty();
View Full Code Here

        EmsBean emsBean = loadBean(STORAGE_SERVICE_BEAN);
        if (emsBean != null) {
            EmsAttribute attribute = emsBean.getAttribute("Keyspaces");
            if (attribute != null) {
                value = (List<Object>) attribute.refresh();
            }
        }
        if (value == null) {
            value = new ArrayList<Object>();
        }
View Full Code Here

    @Override
    protected void getValues(MeasurementReport report, Set<MeasurementScheduleRequest> requests, EmsBean bean) {
        super.getValues(report, requests, bean);

        EmsAttribute loadAttribute = bean.getAttribute(LOAD_NAME);
        Object loadValue = loadAttribute.refresh();

        EmsAttribute dataFileLocationAttribute = bean.getAttribute(DATA_FILE_LOCATIONS_NAME);
        Object dataFileLocationValue = dataFileLocationAttribute.refresh();

        double load = 0;
View Full Code Here

        EmsAttribute loadAttribute = bean.getAttribute(LOAD_NAME);
        Object loadValue = loadAttribute.refresh();

        EmsAttribute dataFileLocationAttribute = bean.getAttribute(DATA_FILE_LOCATIONS_NAME);
        Object dataFileLocationValue = dataFileLocationAttribute.refresh();

        double load = 0;
        if (loadValue != null && dataFileLocationValue != null && dataFileLocationValue instanceof String[]) {
            //Please visit for details: https://issues.apache.org/jira/browse/CASSANDRA-2749
            //The average usage of all partitions with the data will be reported.
View Full Code Here

        }

        for (MeasurementScheduleRequest request : requests) {
            if (OWNERSHIP_METRIC_NAME.equals(request.getName()) && host != null) {
                EmsAttribute attribute = bean.getAttribute(OWNERSHIP_METRIC_NAME);
                Object valueObject = attribute.refresh();
                if (valueObject instanceof Map<?, ?>) {
                    @SuppressWarnings("unchecked")
                    Map<InetAddress, Float> ownership = (Map<InetAddress, Float>) valueObject;
                    Float value = ownership.get(host);
                    if (value == null) {
View Full Code Here

            if (propertyDefinition instanceof PropertyDefinitionList) {

                EmsAttribute attribute = getEmsBean().getAttribute(propertyDefinition.getName());

                if (attribute != null) {
                    Object result = attribute.refresh();

                    PropertyList propertyList = new PropertyList(propertyDefinition.getName());

                    if (result instanceof Map) {
                        PropertyDefinitionMap propertyDefinitionMap = (PropertyDefinitionMap) ((PropertyDefinitionList) propertyDefinition)
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.