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 SingleVMPoolUtil {
026
027 public static void clear() {
028 getSingleVMPool().clear();
029 }
030
031 public static void clear(String name) {
032 getSingleVMPool().clear(name);
033 }
034
035
038 public static Object get(PortalCache portalCache, String key) {
039 return getSingleVMPool().get(portalCache, key);
040 }
041
042 public static Object get(String name, String key) {
043 return getSingleVMPool().get(name, key);
044 }
045
046 public static PortalCache getCache(String name) {
047 return getSingleVMPool().getCache(name);
048 }
049
050 public static PortalCache getCache(String name, boolean blocking) {
051 return getSingleVMPool().getCache(name, blocking);
052 }
053
054 public static SingleVMPool getSingleVMPool() {
055 PortalRuntimePermission.checkGetBeanProperty(SingleVMPoolUtil.class);
056
057 return _singleVMPool;
058 }
059
060
063 public static void put(PortalCache portalCache, String key, Object value) {
064 getSingleVMPool().put(portalCache, key, value);
065 }
066
067
070 public static void put(
071 PortalCache portalCache, String key, Object value, int timeToLive) {
072
073 getSingleVMPool().put(portalCache, key, value, timeToLive);
074 }
075
076
079 public static void put(
080 PortalCache portalCache, String key, Serializable value) {
081
082 getSingleVMPool().put(portalCache, key, value);
083 }
084
085
088 public static void put(
089 PortalCache portalCache, String key, Serializable value,
090 int timeToLive) {
091
092 getSingleVMPool().put(portalCache, key, value, timeToLive);
093 }
094
095 public static void put(String name, String key, Object value) {
096 getSingleVMPool().put(name, key, value);
097 }
098
099 public static void put(String name, String key, Serializable value) {
100 getSingleVMPool().put(name, key, value);
101 }
102
103
106 public static void remove(PortalCache portalCache, String key) {
107 getSingleVMPool().remove(portalCache, key);
108 }
109
110 public static void remove(String name, String key) {
111 getSingleVMPool().remove(name, key);
112 }
113
114 public static void removeCache(String name) {
115 getSingleVMPool().removeCache(name);
116 }
117
118 public void setSingleVMPool(SingleVMPool singleVMPool) {
119 PortalRuntimePermission.checkSetBeanProperty(getClass());
120
121 _singleVMPool = singleVMPool;
122 }
123
124 private static SingleVMPool _singleVMPool;
125
126 }