1 |
| |
2 |
| |
3 |
| |
4 |
| |
5 |
| |
6 |
| |
7 |
| package org.jboss.cache.config; |
8 |
| |
9 |
| import org.jboss.cache.optimistic.DataVersion; |
10 |
| |
11 |
| |
12 |
| |
13 |
| |
14 |
| |
15 |
| |
16 |
| |
17 |
| public class Option implements Cloneable |
18 |
| { |
19 |
| private boolean failSilently; |
20 |
| private boolean cacheModeLocal; |
21 |
| private DataVersion dataVersion; |
22 |
| private boolean suppressLocking; |
23 |
| private boolean forceDataGravitation; |
24 |
| private boolean bypassInterceptorChain; |
25 |
| private boolean forceWriteLock; |
26 |
| |
27 |
| |
28 |
| |
29 |
| |
30 |
3136105
| public boolean isSuppressLocking()
|
31 |
| { |
32 |
3136090
| return suppressLocking;
|
33 |
| } |
34 |
| |
35 |
| |
36 |
| |
37 |
| |
38 |
| |
39 |
| |
40 |
11
| public void setSuppressLocking(boolean suppressLocking)
|
41 |
| { |
42 |
11
| this.suppressLocking = suppressLocking;
|
43 |
| } |
44 |
| |
45 |
| |
46 |
| |
47 |
| |
48 |
| |
49 |
2483353
| public boolean isFailSilently()
|
50 |
| { |
51 |
2483353
| return failSilently;
|
52 |
| } |
53 |
| |
54 |
| |
55 |
| |
56 |
| |
57 |
| |
58 |
| |
59 |
29
| public void setFailSilently(boolean failSilently)
|
60 |
| { |
61 |
29
| this.failSilently = failSilently;
|
62 |
| } |
63 |
| |
64 |
| |
65 |
| |
66 |
| |
67 |
| |
68 |
| |
69 |
1884645
| public boolean isCacheModeLocal()
|
70 |
| { |
71 |
1884645
| return cacheModeLocal;
|
72 |
| } |
73 |
| |
74 |
| |
75 |
| |
76 |
| |
77 |
| |
78 |
| |
79 |
| |
80 |
1402192
| public void setCacheModeLocal(boolean cacheModeLocal)
|
81 |
| { |
82 |
1402192
| this.cacheModeLocal = cacheModeLocal;
|
83 |
| } |
84 |
| |
85 |
| |
86 |
| |
87 |
| |
88 |
3889
| public DataVersion getDataVersion()
|
89 |
| { |
90 |
3889
| return dataVersion;
|
91 |
| } |
92 |
| |
93 |
| |
94 |
| |
95 |
| |
96 |
| |
97 |
| |
98 |
224
| public void setDataVersion(DataVersion dataVersion)
|
99 |
| { |
100 |
224
| this.dataVersion = dataVersion;
|
101 |
| } |
102 |
| |
103 |
| |
104 |
| |
105 |
| |
106 |
374
| public boolean getForceDataGravitation()
|
107 |
| { |
108 |
374
| return forceDataGravitation;
|
109 |
| } |
110 |
| |
111 |
| |
112 |
| |
113 |
| |
114 |
| |
115 |
| |
116 |
| |
117 |
| |
118 |
211830
| public void setForceDataGravitation(boolean enableDataGravitation)
|
119 |
| { |
120 |
211830
| this.forceDataGravitation = enableDataGravitation;
|
121 |
| } |
122 |
| |
123 |
| |
124 |
0
| public String toString()
|
125 |
| { |
126 |
0
| return "Option{" +
|
127 |
| "failSilently=" + failSilently + |
128 |
| ", cacheModeLocal=" + cacheModeLocal + |
129 |
| ", dataVersion=" + dataVersion + |
130 |
| ", suppressLocking=" + suppressLocking + |
131 |
| ", forceDataGravitation=" + forceDataGravitation + |
132 |
| ", bypassInterceptorChain=" + bypassInterceptorChain + |
133 |
| '}'; |
134 |
| } |
135 |
| |
136 |
12
| public Option clone() throws CloneNotSupportedException
|
137 |
| { |
138 |
12
| return (Option) super.clone();
|
139 |
| } |
140 |
| |
141 |
| |
142 |
12
| public boolean equals(Object o)
|
143 |
| { |
144 |
0
| if (this == o) return true;
|
145 |
0
| if (o == null || getClass() != o.getClass()) return false;
|
146 |
| |
147 |
12
| final Option option = (Option) o;
|
148 |
| |
149 |
0
| if (bypassInterceptorChain != option.bypassInterceptorChain) return false;
|
150 |
0
| if (cacheModeLocal != option.cacheModeLocal) return false;
|
151 |
0
| if (failSilently != option.failSilently) return false;
|
152 |
0
| if (forceDataGravitation != option.forceDataGravitation) return false;
|
153 |
0
| if (suppressLocking != option.suppressLocking) return false;
|
154 |
0
| if (dataVersion != null ? !dataVersion.equals(option.dataVersion) : option.dataVersion != null) return false;
|
155 |
0
| if (forceWriteLock != option.forceWriteLock) return false;
|
156 |
12
| return true;
|
157 |
| } |
158 |
| |
159 |
0
| public int hashCode()
|
160 |
| { |
161 |
0
| int result;
|
162 |
0
| result = (failSilently ? 1 : 0);
|
163 |
0
| result = 29 * result + (cacheModeLocal ? 1 : 0);
|
164 |
0
| result = 29 * result + (dataVersion != null ? dataVersion.hashCode() : 0);
|
165 |
0
| result = 29 * result + (suppressLocking ? 1 : 0);
|
166 |
0
| result = 29 * result + (forceDataGravitation ? 1 : 0);
|
167 |
0
| result = 29 * result + (bypassInterceptorChain ? 1 : 0);
|
168 |
0
| result = 29 * result + (forceWriteLock ? 0 : 1);
|
169 |
0
| return result;
|
170 |
| } |
171 |
| |
172 |
| |
173 |
| |
174 |
| |
175 |
2483294
| public void reset()
|
176 |
| { |
177 |
2483304
| this.bypassInterceptorChain = false;
|
178 |
2483304
| this.cacheModeLocal = false;
|
179 |
2483304
| this.failSilently = false;
|
180 |
2483304
| this.forceDataGravitation = false;
|
181 |
2483304
| this.suppressLocking = false;
|
182 |
2483304
| this.dataVersion = null;
|
183 |
2483304
| this.forceWriteLock = false;
|
184 |
| } |
185 |
| |
186 |
| |
187 |
| |
188 |
| |
189 |
| |
190 |
| |
191 |
| |
192 |
3
| public void setForceWriteLock(boolean forceWriteLock)
|
193 |
| { |
194 |
3
| this.forceWriteLock = forceWriteLock;
|
195 |
| } |
196 |
| |
197 |
| |
198 |
| |
199 |
| |
200 |
| |
201 |
| |
202 |
| |
203 |
8480135
| public boolean isForceWriteLock()
|
204 |
| { |
205 |
8480132
| return forceWriteLock;
|
206 |
| } |
207 |
| } |