001/* 002 * (C) Copyright 2014 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 * <a href="mailto:grenard@nuxeo.com">Guillaume</a> 016 */ 017package org.nuxeo.ecm.platform.sessioninspector.jsf.model; 018 019/** 020 * Might be useful to check for references stats (in case same object is referenced in several items state). 021 * 022 * @since 5.9.2 023 */ 024public class ObjectStatistics { 025 026 private String type; 027 028 private long nbInstance; 029 030 private long cumulatedSize; 031 032 /** 033 * @param type 034 * @param nbObject 035 * @param cumulatedSize 036 */ 037 public ObjectStatistics(String type, long nbInstance, long cumulatedSize) { 038 super(); 039 this.type = type; 040 this.nbInstance = nbInstance; 041 this.cumulatedSize = cumulatedSize; 042 } 043 044 /** 045 * @param type 046 * @param nbObject 047 * @param cumulatedSize 048 */ 049 public ObjectStatistics(String type) { 050 this(type, 1, 0); 051 } 052 053 public String getType() { 054 return type; 055 } 056 057 public void setType(String type) { 058 this.type = type; 059 } 060 061 public long getNbInstance() { 062 return nbInstance; 063 } 064 065 public void setNbInstance(long nbInstance) { 066 this.nbInstance = nbInstance; 067 } 068 069 public long getCumulatedSize() { 070 return cumulatedSize; 071 } 072 073 public void setCumulatedSize(long cumulatedSize) { 074 this.cumulatedSize = cumulatedSize; 075 } 076 077}