1 package org.apache.archiva.rest.api.model;
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License. You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied. See the License for the
17 * specific language governing permissions and limitations
21 import javax.xml.bind.annotation.XmlRootElement;
22 import java.io.Serializable;
25 * @author Olivier Lamy
28 @XmlRootElement( name = "cacheEntry" )
29 public class CacheEntry
30 implements Serializable
36 private long cacheHits;
38 private long cacheMiss;
40 private String cacheHitRate;
42 private long inMemorySize;
49 public CacheEntry( String key, long size, long cacheHits, long cacheMiss, String cacheHitRate, long inMemorySize )
53 this.cacheHits = cacheHits;
54 this.cacheMiss = cacheMiss;
55 this.cacheHitRate = cacheHitRate;
56 this.inMemorySize = inMemorySize;
59 public String getKey()
64 public void setKey( String key )
74 public void setSize( long size )
79 public long getCacheHits()
84 public void setCacheHits( long cacheHits )
86 this.cacheHits = cacheHits;
89 public long getCacheMiss()
94 public void setCacheMiss( long cacheMiss )
96 this.cacheMiss = cacheMiss;
99 public String getCacheHitRate()
104 public void setCacheHitRate( String cacheHitRate )
106 this.cacheHitRate = cacheHitRate;
109 public long getInMemorySize()
114 public void setInMemorySize( long inMemorySize )
116 this.inMemorySize = inMemorySize;
120 public String toString()
122 final StringBuilder sb = new StringBuilder();
123 sb.append( "CacheEntry" );
124 sb.append( "{key='" ).append( key ).append( '\'' );
125 sb.append( ", size=" ).append( size );
126 sb.append( ", cacheHits=" ).append( cacheHits );
127 sb.append( ", cacheMiss=" ).append( cacheMiss );
128 sb.append( ", cacheHitRate='" ).append( cacheHitRate ).append( '\'' );
129 sb.append( ", inMemorySize=" ).append( inMemorySize );
131 return sb.toString();