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