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 <K extends Serializable, V> PortalCache<K, V> getCache(
032 String name) {
033
034 return (PortalCache<K, V>)getSingleVMPool().getCache(name);
035 }
036
037 public static <K extends Serializable, V> PortalCache<K, V> getCache(
038 String name, boolean blocking) {
039
040 return (PortalCache<K, V>)getSingleVMPool().getCache(name, blocking);
041 }
042
043 public static SingleVMPool getSingleVMPool() {
044 PortalRuntimePermission.checkGetBeanProperty(SingleVMPoolUtil.class);
045
046 return _singleVMPool;
047 }
048
049 public static void removeCache(String name) {
050 getSingleVMPool().removeCache(name);
051 }
052
053 public void setSingleVMPool(SingleVMPool singleVMPool) {
054 PortalRuntimePermission.checkSetBeanProperty(getClass());
055
056 _singleVMPool = singleVMPool;
057 }
058
059 private static SingleVMPool _singleVMPool;
060
061 }