/*
 * Copyright 2008 to the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.rioproject.system.measurable.disk;

import org.rioproject.system.MeasuredResource;
import org.rioproject.watch.ThresholdValues;

import java.io.Serializable;

/**
 * Measured Disk statistics
 */
public class DiskSpaceUtilization extends MeasuredResource
    implements Serializable {
    static final long serialVersionUID = 1L;
    private double used = 0;
    private double available = 0;
    private double capacity = 0;

    /**
     * Construct a DiskSpaceUtilization with parameters
     *
     * @param identifier Identifier for the DiskSpaceUtilization
     * @param total The total system disk utilization
     * @param tVals ThresholdValues for the DiskSpaceUtilization
     */
    public DiskSpaceUtilization(String identifier, double total, ThresholdValues tVals) {
        super(identifier, total, tVals);
    }

    public DiskSpaceUtilization(String identifier,
                                double used,
                                double available,
                                double capacity,
                                double utilization,
                                ThresholdValues tVals) {
        super(identifier, utilization, tVals);
        this.used = used;
        this.available = available;
        this.capacity = capacity;
    }

    public double getUsed() {
        return used;
    }

    public double getAvailable() {
        return available;
    }

    public double getCapacity() {
        return capacity;
    }

}

@@ -912,16 +912,24 @@
 e %7B%0A    
+private 
 static f
@@ -2105,10 +2105,153 @@
 %0A    %7D%0A%0A
+    @Override public String toString() %7B%0A        return String.format(%22used= %25s, available=%25s, capacity=%25s%22, used, available, capacity);%0A    %7D%0A
 %7D%0A

Add toString() for DiskSpaceUtilization