001/*
002 * (C) Copyright 2011-2015 Nuxeo SA (http://nuxeo.com/) and contributors.
003 *
004 * All rights reserved. This program and the accompanying materials
005 * are made available under the terms of the GNU Lesser General Public License
006 * (LGPL) version 2.1 which accompanies this distribution, and is available at
007 * http://www.gnu.org/licenses/lgpl-2.1.html
008 *
009 * This library is distributed in the hope that it will be useful,
010 * but WITHOUT ANY WARRANTY; without even the implied warranty of
011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
012 * Lesser General Public License for more details.
013 *
014 * Contributors:
015 *     Florent Guillaume
016 */
017package org.nuxeo.ecm.core.blob.binary;
018
019/**
020 * Status of a BinaryManager, including files that may have just been deleted by GC
021 */
022public class BinaryManagerStatus {
023
024    public long gcDuration;
025
026    public long numBinaries;
027
028    public long sizeBinaries;
029
030    public long numBinariesGC;
031
032    public long sizeBinariesGC;
033
034    /**
035     * The GC duration, in milliseconds
036     */
037    public long getGCDuration() {
038        return gcDuration;
039    }
040
041    /**
042     * The number of binaries.
043     */
044    public long getNumBinaries() {
045        return numBinaries;
046    }
047
048    /**
049     * The cumulated size of the binaries.
050     */
051    public long getSizeBinaries() {
052        return sizeBinaries;
053    }
054
055    /**
056     * The number of garbage collected binaries.
057     */
058    public long getNumBinariesGC() {
059        return numBinariesGC;
060    }
061
062    /**
063     * The cumulated size of the garbage collected binaries.
064     */
065    public long getSizeBinariesGC() {
066        return sizeBinariesGC;
067    }
068
069    @Override
070    public String toString() {
071        StringBuilder builder = new StringBuilder();
072        builder.append("BinaryManagerStatus [gcDuration=").append(gcDuration) //
073        .append(", numBinaries=").append(numBinaries) //
074        .append(", sizeBinaries=").append(sizeBinaries) //
075        .append(", numBinariesGC=").append(numBinariesGC) //
076        .append(", sizeBinariesGC=").append(sizeBinariesGC).append("]");
077        return builder.toString();
078    }
079
080}