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;
47 public CacheEntry( String key, long size, long cacheHits, long cacheMiss, String cacheHitRate )
51 this.cacheHits = cacheHits;
52 this.cacheMiss = cacheMiss;
53 this.cacheHitRate = cacheHitRate;
56 public String getKey()
61 public void setKey( String key )
71 public void setSize( long size )
76 public long getCacheHits()
81 public void setCacheHits( long cacheHits )
83 this.cacheHits = cacheHits;
86 public long getCacheMiss()
91 public void setCacheMiss( long cacheMiss )
93 this.cacheMiss = cacheMiss;
96 public String getCacheHitRate()
101 public void setCacheHitRate( String cacheHitRate )
103 this.cacheHitRate = cacheHitRate;
107 public String toString()
109 final StringBuilder sb = new StringBuilder();
110 sb.append( "CacheEntry" );
111 sb.append( "{key='" ).append( key ).append( '\'' );
112 sb.append( ", size=" ).append( size );
113 sb.append( ", cacheHits=" ).append( cacheHits );
114 sb.append( ", cacheMiss=" ).append( cacheMiss );
115 sb.append( ", cacheHitRate=" ).append( cacheHitRate );
117 return sb.toString();