1
14
15 package com.liferay.portal.kernel.cache;
16
17 import java.io.Serializable;
18
19
25 public class SingleVMPoolUtil {
26
27 public static void clear() {
28 getSingleVMPool().clear();
29 }
30
31 public static void clear(String name) {
32 getSingleVMPool().clear(name);
33 }
34
35 public static Object get(String name, String key) {
36 return getSingleVMPool().get(name, key);
37 }
38
39
42 public static Object get(PortalCache portalCache, String key) {
43 return getSingleVMPool().get(portalCache, key);
44 }
45
46 public static PortalCache getCache(String name) {
47 return getSingleVMPool().getCache(name);
48 }
49
50 public static PortalCache getCache(String name, boolean blocking) {
51 return getSingleVMPool().getCache(name, blocking);
52 }
53
54 public static SingleVMPool getSingleVMPool() {
55 return _singleVMPool;
56 }
57
58 public static void put(String name, String key, Object obj) {
59 getSingleVMPool().put(name, key, obj);
60 }
61
62
65 public static void put(PortalCache portalCache, String key, Object obj) {
66 getSingleVMPool().put(portalCache, key, obj);
67 }
68
69
72 public static void put(
73 PortalCache portalCache, String key, Object obj, int timeToLive) {
74
75 getSingleVMPool().put(portalCache, key, obj, timeToLive);
76 }
77
78 public static void put(String name, String key, Serializable obj) {
79 getSingleVMPool().put(name, key, obj);
80 }
81
82
85 public static void put(
86 PortalCache portalCache, String key, Serializable obj) {
87
88 getSingleVMPool().put(portalCache, key, obj);
89 }
90
91
94 public static void put(
95 PortalCache portalCache, String key, Serializable obj, int timeToLive) {
96
97 getSingleVMPool().put(portalCache, key, obj, timeToLive);
98 }
99
100 public static void remove(String name, String key) {
101 getSingleVMPool().remove(name, key);
102 }
103
104
107 public static void remove(PortalCache portalCache, String key) {
108 getSingleVMPool().remove(portalCache, key);
109 }
110
111 public void setSingleVMPool(SingleVMPool singleVMPool) {
112 _singleVMPool = singleVMPool;
113 }
114
115 private static SingleVMPool _singleVMPool;
116
117 }