1 package org.apache.commons.jcs3.auxiliary.remote.value;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 import java.io.Serializable;
23 import java.util.Set;
24
25 import org.apache.commons.jcs3.engine.behavior.ICacheElement;
26
27
28
29
30
31
32
33 public class RemoteCacheRequest<K, V>
34 implements Serializable
35 {
36
37 private static final long serialVersionUID = -8858447417390442569L;
38
39
40 private RemoteRequestType requestType;
41
42
43 private long requesterId;
44
45
46 private String cacheName;
47
48
49 private K key;
50
51
52 private Set<K> keySet;
53
54
55 private String pattern;
56
57
58 private ICacheElement<K, V> cacheElement;
59
60
61
62
63 public void setRequestType( final RemoteRequestType requestType )
64 {
65 this.requestType = requestType;
66 }
67
68
69
70
71 public RemoteRequestType getRequestType()
72 {
73 return requestType;
74 }
75
76
77
78
79 public void setCacheName( final String cacheName )
80 {
81 this.cacheName = cacheName;
82 }
83
84
85
86
87 public String getCacheName()
88 {
89 return cacheName;
90 }
91
92
93
94
95 public void setKey( final K key )
96 {
97 this.key = key;
98 }
99
100
101
102
103 public K getKey()
104 {
105 return key;
106 }
107
108
109
110
111 public void setPattern( final String pattern )
112 {
113 this.pattern = pattern;
114 }
115
116
117
118
119 public String getPattern()
120 {
121 return pattern;
122 }
123
124
125
126
127 public void setCacheElement( final ICacheElement<K, V> cacheElement )
128 {
129 this.cacheElement = cacheElement;
130 }
131
132
133
134
135 public ICacheElement<K, V> getCacheElement()
136 {
137 return cacheElement;
138 }
139
140
141
142
143 public void setRequesterId( final long requesterId )
144 {
145 this.requesterId = requesterId;
146 }
147
148
149
150
151 public long getRequesterId()
152 {
153 return requesterId;
154 }
155
156
157
158
159 public void setKeySet( final Set<K> keySet )
160 {
161 this.keySet = keySet;
162 }
163
164
165
166
167 public Set<K> getKeySet()
168 {
169 return keySet;
170 }
171
172
173 @Override
174 public String toString()
175 {
176 final StringBuilder buf = new StringBuilder();
177 buf.append( "\nRemoteHttpCacheRequest" );
178 buf.append( "\n requesterId [" + getRequesterId() + "]" );
179 buf.append( "\n requestType [" + getRequestType() + "]" );
180 buf.append( "\n cacheName [" + getCacheName() + "]" );
181 buf.append( "\n key [" + getKey() + "]" );
182 buf.append( "\n keySet [" + getKeySet() + "]" );
183 buf.append( "\n pattern [" + getPattern() + "]" );
184 buf.append( "\n cacheElement [" + getCacheElement() + "]" );
185 return buf.toString();
186 }
187 }