001
014
015 package com.liferay.portal.kernel.cache;
016
017 import com.liferay.portal.kernel.spring.osgi.OSGiBeanProperties;
018 import com.liferay.portal.kernel.util.ProxyFactory;
019
020 import java.io.Serializable;
021
022
026 @OSGiBeanProperties(service = SingleVMPoolUtil.class)
027 public class SingleVMPoolUtil {
028
029 public static void clear() {
030 _singleVMPool.clear();
031 }
032
033
036 @Deprecated
037 public static <K extends Serializable, V> PortalCache<K, V> getCache(
038 String portalCacheName) {
039
040 return getPortalCache(portalCacheName);
041 }
042
043
047 @Deprecated
048 public static <K extends Serializable, V> PortalCache<K, V> getCache(
049 String portalCacheName, boolean blocking) {
050
051 return getPortalCache(portalCacheName, blocking);
052 }
053
054
057 @Deprecated
058 public static <K extends Serializable, V> PortalCacheManager<K, V>
059 getCacheManager() {
060
061 return getPortalCacheManager();
062 }
063
064 public static <K extends Serializable, V> PortalCache<K, V> getPortalCache(
065 String portalCacheName) {
066
067 return (PortalCache<K, V>)_singleVMPool.getPortalCache(portalCacheName);
068 }
069
070 public static <K extends Serializable, V> PortalCache<K, V> getPortalCache(
071 String portalCacheName, boolean blocking) {
072
073 return (PortalCache<K, V>)_singleVMPool.getPortalCache(
074 portalCacheName, blocking);
075 }
076
077 public static <K extends Serializable, V> PortalCacheManager<K, V>
078 getPortalCacheManager() {
079
080 return (PortalCacheManager<K, V>)_singleVMPool.getPortalCacheManager();
081 }
082
083
086 @Deprecated
087 public static void removeCache(String portalCacheName) {
088 removePortalCache(portalCacheName);
089 }
090
091 public static void removePortalCache(String portalCacheName) {
092 _singleVMPool.removePortalCache(portalCacheName);
093 }
094
095 private static final SingleVMPool _singleVMPool =
096 ProxyFactory.newServiceTrackedInstance(SingleVMPool.class);
097
098 }