1 package org.apache.commons.jcs3.auxiliary;
2
3 /*
4 * Licensed to the Apache Software Foundation (ASF) under one
5 * or more contributor license agreements. See the NOTICE file
6 * distributed with this work for additional information
7 * regarding copyright ownership. The ASF licenses this file
8 * to you under the Apache License, Version 2.0 (the
9 * "License"); you may not use this file except in compliance
10 * with the License. You may obtain a copy of the License at
11 *
12 * http://www.apache.org/licenses/LICENSE-2.0
13 *
14 * Unless required by applicable law or agreed to in writing,
15 * software distributed under the License is distributed on an
16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 * KIND, either express or implied. See the License for the
18 * specific language governing permissions and limitations
19 * under the License.
20 */
21
22 import java.io.Serializable;
23
24 import org.apache.commons.jcs3.engine.behavior.ICacheEventQueue;
25
26 /**
27 * This is a nominal interface that auxiliary cache attributes should implement. This allows the
28 * auxiliary mangers to share a common interface.
29 */
30 public interface AuxiliaryCacheAttributes
31 extends Serializable, Cloneable
32 {
33 /**
34 * Sets the name of the cache, referenced by the appropriate manager.
35 * <p>
36 * @param s The new cacheName value
37 */
38 void setCacheName( String s );
39
40 /**
41 * Gets the cacheName attribute of the AuxiliaryCacheAttributes object
42 * <p>
43 * @return The cacheName value
44 */
45 String getCacheName();
46
47 /**
48 * Name known by configurator
49 * <p>
50 * @param s The new name value
51 */
52 void setName( String s );
53
54 /**
55 * Gets the name attribute of the AuxiliaryCacheAttributes object
56 * <p>
57 * @return The name value
58 */
59 String getName();
60
61 /**
62 * SINGLE is the default. If you choose POOLED, the value of EventQueuePoolName will be used
63 * <p>
64 * @param s SINGLE or POOLED
65 */
66 void setEventQueueType( ICacheEventQueue.QueueType s );
67
68 /**
69 * @return SINGLE or POOLED
70 */
71 ICacheEventQueue.QueueType getEventQueueType();
72
73 /**
74 * If you choose a POOLED event queue type, the value of EventQueuePoolName will be used. This
75 * is ignored if the pool type is SINGLE
76 * <p>
77 * @param s SINGLE or POOLED
78 */
79 void setEventQueuePoolName( String s );
80
81 /**
82 * Sets the pool name to use. If a pool is not found by this name, the thread pool manager will
83 * return a default configuration.
84 * <p>
85 * @return name of thread pool to use for this auxiliary
86 */
87 String getEventQueuePoolName();
88
89 /**
90 * Clone object
91 */
92 AuxiliaryCacheAttributes clone();
93 }