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 /**
19 * This has common attributes used by all auxiliaries.
20 */
21 public abstract class AbstractAuxiliaryCacheAttributes
22 implements AuxiliaryCacheAttributes
23 {
24 /** Don't change */
25 private static final long serialVersionUID = -6594609334959187673L;
26
27 /** cacheName */
28 protected String cacheName;
29
30 /** name */
31 protected String name;
32
33 /** eventQueueType -- custom classname, pooled, or single threaded */
34 protected String eventQueueType;
35
36 /** Named when pooled */
37 protected String eventQueuePoolName;
38
39 /**
40 * @param name
41 */
42 public void setCacheName( String name )
43 {
44 this.cacheName = name;
45 }
46
47 /**
48 * Gets the cacheName attribute of the AuxiliaryCacheAttributes object
49 * <p>
50 * @return The cacheName value
51 */
52 public String getCacheName()
53 {
54 return this.cacheName;
55 }
56
57 /**
58 * This is the name of the auxiliary in configuration file.
59 * <p>
60 * @see org.apache.jcs.auxiliary.AuxiliaryCacheAttributes#setName(java.lang.String)
61 */
62 public void setName( String s )
63 {
64 this.name = s;
65 }
66
67 /**
68 * Gets the name attribute of the AuxiliaryCacheAttributes object
69 * <p>
70 * @return The name value
71 */
72 public String getName()
73 {
74 return this.name;
75 }
76
77 /**
78 * SINGLE is the default. If you choose POOLED, the value of EventQueuePoolName will be used
79 * <p>
80 * @param queueType SINGLE or POOLED or a classname
81 */
82 public void setEventQueueType( String queueType )
83 {
84 this.eventQueueType = queueType;
85 }
86
87 /**
88 * @return SINGLE or POOLED
89 */
90 public String getEventQueueType()
91 {
92 return eventQueueType;
93 }
94
95 /**
96 * If you choose a POOLED event queue type, the value of EventQueuePoolName will be used. This
97 * is ignored if the pool type is SINGLE
98 * <p>
99 * @param s SINGLE or POOLED
100 */
101 public void setEventQueuePoolName( String s )
102 {
103 eventQueuePoolName = s;
104 }
105
106 /**
107 * Sets the pool name to use. If a pool is not found by this name, the thread pool manager will
108 * return a default configuration.
109 * <p>
110 * @return name of thread pool to use for this auxiliary
111 */
112 public String getEventQueuePoolName()
113 {
114 return eventQueuePoolName;
115 }
116 }