View Javadoc

1   package org.apache.torque.manager;
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.jcs.access.GroupCacheAccess;
25  import org.apache.torque.TorqueException;
26  
27  /**
28   * This class provides a no-op cache for convenient storage of method results
29   *
30   * @author <a href="mailto:jmcnally@collab.net">John McNally</a>
31   * @version $Id: NoOpMethodResultCache.java 1337973 2012-05-13 19:49:35Z tv $
32   */
33  public class NoOpMethodResultCache
34      extends MethodResultCache
35  {
36      public NoOpMethodResultCache(GroupCacheAccess cache)
37      {
38          super();
39      }
40  
41      /**
42       * Clear the cache
43       */
44      public void clear()
45      {
46         //empty
47      }
48  
49      /**
50       * @see org.apache.torque.manager.MethodResultCache#getImpl(org.apache.torque.manager.MethodCacheKey)
51       */
52      @Override
53      protected Object getImpl(MethodCacheKey key)
54      {
55          return null;
56      }
57  
58      /**
59       * @see org.apache.torque.manager.MethodResultCache#putImpl(org.apache.torque.manager.MethodCacheKey, java.lang.Object)
60       */
61      @Override
62      protected Object putImpl(MethodCacheKey key, Object value) throws TorqueException
63      {
64          return null;
65      }
66  
67      /**
68       * @see org.apache.torque.manager.MethodResultCache#removeImpl(org.apache.torque.manager.MethodCacheKey)
69       */
70      @Override
71      protected Object removeImpl(MethodCacheKey key)
72      {
73          return null;
74      }
75  
76      /**
77       * @see org.apache.torque.manager.MethodResultCache#get(java.io.Serializable, java.lang.String, java.io.Serializable[])
78       */
79      @Override
80      public <T> T get(Serializable instanceOrClass, String method, Serializable... arg)
81      {
82          return null;
83      }
84  
85      /**
86       * @see org.apache.torque.manager.MethodResultCache#put(java.lang.Object, java.io.Serializable, java.lang.String, java.io.Serializable[])
87       */
88      @Override
89      public <T> void put(T value, Serializable instanceOrClass, String method, Serializable... arg)
90      {
91          //empty
92      }
93  
94      /**
95       * @see org.apache.torque.manager.MethodResultCache#removeAll(java.io.Serializable, java.lang.String)
96       */
97      @Override
98      public void removeAll(Serializable instanceOrClass, String method)
99      {
100         //empty
101     }
102 
103     /**
104      * @see org.apache.torque.manager.MethodResultCache#remove(java.io.Serializable, java.lang.String, java.io.Serializable[])
105      */
106     @Override
107     public <T> T remove(Serializable instanceOrClass, String method, Serializable... arg)
108     {
109         return null;
110     }
111 }