1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   *
13   */
14  
15  package com.liferay.portal.kernel.cache;
16  
17  import java.io.Serializable;
18  
19  /**
20   * <a href="MultiVMPoolUtil.java.html"><b><i>View Source</i></b></a>
21   *
22   * @author Brian Wing Shun Chan
23   * @author Michael Young
24   */
25  public class MultiVMPoolUtil {
26  
27      public static void clear() {
28          getMultiVMPool().clear();
29      }
30  
31      public static void clear(String name) {
32          getMultiVMPool().clear(name);
33      }
34  
35      public static Object get(String name, String key) {
36          return getMultiVMPool().get(name, key);
37      }
38  
39      /**
40       * @deprecated
41       */
42      public static Object get(PortalCache portalCache, String key) {
43          return getMultiVMPool().get(portalCache, key);
44      }
45  
46      public static MultiVMPool getMultiVMPool() {
47          return _multiVMPool;
48      }
49  
50      public static PortalCache getCache(String name) {
51          return getMultiVMPool().getCache(name);
52      }
53  
54      public static PortalCache getCache(String name, boolean blocking) {
55          return getMultiVMPool().getCache(name, blocking);
56      }
57  
58      public static void put(String name, String key, Object obj) {
59          getMultiVMPool().put(name, key, obj);
60      }
61  
62      /**
63       * @deprecated
64       */
65      public static void put(PortalCache portalCache, String key, Object obj) {
66          getMultiVMPool().put(portalCache, key, obj);
67      }
68  
69      public static void put(String name, String key, Serializable obj) {
70          getMultiVMPool().put(name, key, obj);
71      }
72  
73      /**
74       * @deprecated
75       */
76      public static void put(
77          PortalCache portalCache, String key, Serializable obj) {
78  
79          getMultiVMPool().put(portalCache, key, obj);
80      }
81  
82      public static void remove(String name, String key) {
83          getMultiVMPool().remove(name, key);
84      }
85  
86      /**
87       * @deprecated
88       */
89      public static void remove(PortalCache portalCache, String key) {
90          getMultiVMPool().remove(portalCache, key);
91      }
92  
93      public static void removeCache(String name) {
94          getMultiVMPool().removeCache(name);
95      }
96  
97      public void setMultiVMPool(MultiVMPool multiVMPool) {
98          _multiVMPool = multiVMPool;
99      }
100 
101     private static MultiVMPool _multiVMPool;
102 
103 }