001
014
015 package com.liferay.portal.kernel.cache;
016
017 import com.liferay.portal.kernel.security.pacl.permission.PortalRuntimePermission;
018
019 import java.io.Serializable;
020
021
025 public class MultiVMPoolUtil {
026
027 public static void clear() {
028 getMultiVMPool().clear();
029 }
030
031 public static void clear(String name) {
032 getMultiVMPool().clear(name);
033 }
034
035
038 public static Object get(PortalCache portalCache, String key) {
039 return getMultiVMPool().get(portalCache, key);
040 }
041
042 public static Object get(String name, String key) {
043 return getMultiVMPool().get(name, key);
044 }
045
046 public static PortalCache getCache(String name) {
047 return getMultiVMPool().getCache(name);
048 }
049
050 public static PortalCache getCache(String name, boolean blocking) {
051 return getMultiVMPool().getCache(name, blocking);
052 }
053
054 public static MultiVMPool getMultiVMPool() {
055 PortalRuntimePermission.checkGetBeanProperty(MultiVMPoolUtil.class);
056
057 return _multiVMPool;
058 }
059
060
063 public static void put(PortalCache portalCache, String key, Object value) {
064 getMultiVMPool().put(portalCache, key, value);
065 }
066
067
070 public static void put(
071 PortalCache portalCache, String key, Serializable value) {
072
073 getMultiVMPool().put(portalCache, key, value);
074 }
075
076 public static void put(String name, String key, Object value) {
077 getMultiVMPool().put(name, key, value);
078 }
079
080 public static void put(String name, String key, Serializable value) {
081 getMultiVMPool().put(name, key, value);
082 }
083
084
087 public static void remove(PortalCache portalCache, String key) {
088 getMultiVMPool().remove(portalCache, key);
089 }
090
091 public static void remove(String name, String key) {
092 getMultiVMPool().remove(name, key);
093 }
094
095 public static void removeCache(String name) {
096 getMultiVMPool().removeCache(name);
097 }
098
099 public void setMultiVMPool(MultiVMPool multiVMPool) {
100 PortalRuntimePermission.checkSetBeanProperty(getClass());
101
102 _multiVMPool = multiVMPool;
103 }
104
105 private static MultiVMPool _multiVMPool;
106
107 }