1
22
23 package com.liferay.portal.kernel.cache;
24
25 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
26
27 import java.io.Serializable;
28
29 import java.util.Map;
30 import java.util.Set;
31
32
39 public class MultiVMPoolUtil {
40
41 public static void clear() {
42 getMultiVMPool().clear();
43 }
44
45 public static void clear(String name) {
46 getMultiVMPool().clear(name);
47 }
48
49 public static void clearGroup(
50 Map<String, Set<String>> groups, String groupKey,
51 PortalCache portalCache) {
52
53 getMultiVMPool().clearGroup(groups, groupKey, portalCache);
54 }
55
56 public static Object get(String name, String key) {
57 return getMultiVMPool().get(name, key);
58 }
59
60 public static Object get(PortalCache portalCache, String key) {
61 return getMultiVMPool().get(portalCache, key);
62 }
63
64 public static MultiVMPool getMultiVMPool() {
65 return _getUtil()._multiVMPool;
66 }
67
68 public static PortalCache getCache(String name) {
69 return getMultiVMPool().getCache(name);
70 }
71
72 public static void put(String name, String key, Object obj) {
73 getMultiVMPool().put(name, key, obj);
74 }
75
76 public static void put(PortalCache portalCache, String key, Object obj) {
77 getMultiVMPool().put(portalCache, key, obj);
78 }
79
80 public static void put(
81 PortalCache portalCache, String key, Map<String, Set<String>> groups,
82 String groupKey, Object obj) {
83
84 getMultiVMPool().put(portalCache, key, groups, groupKey, obj);
85 }
86
87 public static void put(String name, String key, Serializable obj) {
88 getMultiVMPool().put(name, key, obj);
89 }
90
91 public static void put(
92 PortalCache portalCache, String key, Serializable obj) {
93
94 getMultiVMPool().put(portalCache, key, obj);
95 }
96
97 public static void put(
98 PortalCache portalCache, String key, Map<String, Set<String>> groups,
99 String groupKey, Serializable obj) {
100
101 getMultiVMPool().put(portalCache, key, groups, groupKey, obj);
102 }
103
104 public static void remove(String name, String key) {
105 getMultiVMPool().remove(name, key);
106 }
107
108 public static void remove(PortalCache portalCache, String key) {
109 getMultiVMPool().remove(portalCache, key);
110 }
111
112 public static void updateGroup(
113 Map<String, Set<String>> groups, String groupKey, String key) {
114
115 getMultiVMPool().updateGroup(groups, groupKey, key);
116 }
117
118 public void setMultiVMPool(MultiVMPool multiVMPool) {
119 _multiVMPool = multiVMPool;
120 }
121
122 private static MultiVMPoolUtil _getUtil() {
123 if (_util == null) {
124 _util = (MultiVMPoolUtil)PortalBeanLocatorUtil.locate(_UTIL);
125 }
126
127 return _util;
128 }
129
130 private static final String _UTIL = MultiVMPoolUtil.class.getName();
131
132 private static MultiVMPoolUtil _util;
133
134 private MultiVMPool _multiVMPool;
135
136 }