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