001package org.apache.commons.jcs.engine.stats.behavior;
002
003import java.io.Serializable;
004
005/*
006 * Licensed to the Apache Software Foundation (ASF) under one
007 * or more contributor license agreements.  See the NOTICE file
008 * distributed with this work for additional information
009 * regarding copyright ownership.  The ASF licenses this file
010 * to you under the Apache License, Version 2.0 (the
011 * "License"); you may not use this file except in compliance
012 * with the License.  You may obtain a copy of the License at
013 *
014 *   http://www.apache.org/licenses/LICENSE-2.0
015 *
016 * Unless required by applicable law or agreed to in writing,
017 * software distributed under the License is distributed on an
018 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
019 * KIND, either express or implied.  See the License for the
020 * specific language governing permissions and limitations
021 * under the License.
022 */
023
024/**
025 * IAuxiliaryCacheStats will hold these IStatElements.
026 */
027public interface IStatElement<V> extends Serializable
028{
029    /**
030     * Get the name of the stat element, ex. HitCount
031     * <p>
032     * @return the stat element name
033     */
034    String getName();
035
036    /**
037     * @param name
038     */
039    void setName( String name );
040
041    /**
042     * Get the data, ex. for hit count you would get a value for some number.
043     * <p>
044     * @return data
045     */
046    V getData();
047
048    /**
049     * Set the data for this element.
050     * <p>
051     * @param data
052     */
053    void setData( V data );
054}