001/*
002 * (C) Copyright 2011-2015 Nuxeo SA (http://nuxeo.com/) and others.
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 *     http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 *
016 * Contributors:
017 *     Florent Guillaume
018 */
019package org.nuxeo.ecm.core.blob.binary;
020
021/**
022 * Status of a BinaryManager, including files that may have just been deleted by GC
023 */
024public class BinaryManagerStatus {
025
026    public long gcDuration;
027
028    public long numBinaries;
029
030    public long sizeBinaries;
031
032    public long numBinariesGC;
033
034    public long sizeBinariesGC;
035
036    /**
037     * The GC duration, in milliseconds
038     */
039    public long getGCDuration() {
040        return gcDuration;
041    }
042
043    /**
044     * The number of binaries.
045     */
046    public long getNumBinaries() {
047        return numBinaries;
048    }
049
050    /**
051     * The cumulated size of the binaries.
052     */
053    public long getSizeBinaries() {
054        return sizeBinaries;
055    }
056
057    /**
058     * The number of garbage collected binaries.
059     */
060    public long getNumBinariesGC() {
061        return numBinariesGC;
062    }
063
064    /**
065     * The cumulated size of the garbage collected binaries.
066     */
067    public long getSizeBinariesGC() {
068        return sizeBinariesGC;
069    }
070
071    @Override
072    public String toString() {
073        StringBuilder builder = new StringBuilder();
074        builder.append("BinaryManagerStatus [gcDuration=").append(gcDuration) //
075        .append(", numBinaries=").append(numBinaries) //
076        .append(", sizeBinaries=").append(sizeBinaries) //
077        .append(", numBinariesGC=").append(numBinariesGC) //
078        .append(", sizeBinariesGC=").append(sizeBinariesGC).append("]");
079        return builder.toString();
080    }
081
082}