1 package org.apache.commons.jcs.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 org.apache.commons.jcs.auxiliary.AuxiliaryCacheFactory;
23
24 /**
25 * Base class for auxiliary cache factories.
26 */
27 public abstract class AbstractAuxiliaryCacheFactory
28 implements AuxiliaryCacheFactory
29 {
30 /** The auxiliary name. The composite cache manager keeps this in a map, keyed by name. */
31 private String name = this.getClass().getSimpleName();
32
33 /**
34 * Initialize this factory
35 */
36 @Override
37 public void initialize()
38 {
39 // empty
40 }
41
42 /**
43 * Dispose of this factory, clean up shared resources
44 */
45 @Override
46 public void dispose()
47 {
48 // empty
49 }
50
51 /**
52 * Gets the name attribute of the DiskCacheFactory object
53 * <p>
54 * @return The name value
55 */
56 @Override
57 public String getName()
58 {
59 return this.name;
60 }
61
62 /**
63 * Sets the name attribute of the DiskCacheFactory object
64 * <p>
65 * @param name The new name value
66 */
67 @Override
68 public void setName( String name )
69 {
70 this.name = name;
71 }
72 }