001    package org.apache.jcs.auxiliary;
002    
003    /*
004     * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
005     * agreements. See the NOTICE file distributed with this work for additional information regarding
006     * copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the
007     * "License"); you may not use this file except in compliance with the License. You may obtain a
008     * copy of the License at
009     * 
010     * http://www.apache.org/licenses/LICENSE-2.0
011     * 
012     * Unless required by applicable law or agreed to in writing, software distributed under the License
013     * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
014     * or implied. See the License for the specific language governing permissions and limitations under
015     * the License.
016     */
017    
018    import java.io.Serializable;
019    
020    /**
021     * This is a nominal interface that auxiliary cache attributes should implement. This allows the
022     * auxiliary mangers to share a common interface.
023     */
024    public interface AuxiliaryCacheAttributes
025        extends Cloneable, Serializable
026    {
027        /** Does not use a thread pool. */
028        public static final String SINGLE_QUEUE_TYPE = "SINGLE";
029    
030        /** Uses a thread pool. */
031        public static final String POOLED_QUEUE_TYPE = "POOLED";
032    
033    
034        /**
035         * Sets the name of the cache, referenced by the appropriate manager.
036         * <p>
037         * @param s The new cacheName value
038         */
039        public void setCacheName( String s );
040    
041        /**
042         * Gets the cacheName attribute of the AuxiliaryCacheAttributes object
043         * <p>
044         * @return The cacheName value
045         */
046        public String getCacheName();
047    
048        /**
049         * Name known by by configurator
050         * <p>
051         * @param s The new name value
052         */
053        public void setName( String s );
054    
055        /**
056         * Gets the name attribute of the AuxiliaryCacheAttributes object
057         * <p>
058         * @return The name value
059         */
060        public String getName();
061    
062        /**
063         * SINGLE is the default. If you choose POOLED, the value of EventQueuePoolName will be used
064         * <p>
065         * @param s SINGLE or POOLED
066         */
067        public void setEventQueueType( String s );
068    
069        /**
070         * @return SINGLE or POOLED
071         */
072        public String getEventQueueType();
073    
074        /**
075         * If you choose a POOLED event queue type, the value of EventQueuePoolName will be used. This
076         * is ignored if the pool type is SINGLE
077         * <p>
078         * @param s SINGLE or POOLED
079         */
080        public void setEventQueuePoolName( String s );
081    
082        /**
083         * Sets the pool name to use. If a pool is not found by this name, the thread pool manager will
084         * return a default configuration.
085         * <p>
086         * @return name of thread pool to use for this auxiliary
087         */
088        public String getEventQueuePoolName();
089    
090        /**
091         * Clones
092         * <p>
093         * @return a copy
094         */
095        public AuxiliaryCacheAttributes copy();
096    }