6
6
import com .fasterxml .jackson .core .JsonFactory ;
7
7
import com .fasterxml .jackson .core .util .RecyclerPool .BoundedPoolBase ;
8
8
import com .fasterxml .jackson .core .util .RecyclerPool .ConcurrentDequePoolBase ;
9
- import com .fasterxml .jackson .core .util .RecyclerPool .LockFreePoolBase ;
10
9
11
10
/**
12
11
* Set of {@link RecyclerPool} implementations to be used by the default
@@ -74,7 +73,11 @@ public static RecyclerPool<BufferRecycler> newConcurrentDequePool() {
74
73
* Accessor for getting the shared/global {@link LockFreePool} instance.
75
74
*
76
75
* @return Globally shared instance of {@link LockFreePool}.
76
+ *
77
+ * @deprecated Since 2.18: use one of other implementations instead;
78
+ * see {@link LockFreePool} Javadocs for details
77
79
*/
80
+ @ Deprecated // since 2.18
78
81
public static RecyclerPool <BufferRecycler > sharedLockFreePool () {
79
82
return LockFreePool .GLOBAL ;
80
83
}
@@ -83,7 +86,11 @@ public static RecyclerPool<BufferRecycler> sharedLockFreePool() {
83
86
* Accessor for constructing a new, non-shared {@link LockFreePool} instance.
84
87
*
85
88
* @return Globally shared instance of {@link LockFreePool}.
89
+ *
90
+ * @deprecated Since 2.18: use one of other implementations instead;
91
+ * see {@link LockFreePool} Javadocs for details
86
92
*/
93
+ @ Deprecated // since 2.18
87
94
public static RecyclerPool <BufferRecycler > newLockFreePool () {
88
95
return LockFreePool .construct ();
89
96
}
@@ -204,8 +211,18 @@ protected Object readResolve() {
204
211
*<p>
205
212
* Pool is unbounded: see {@link RecyclerPool} for
206
213
* details on what this means.
214
+ *<p>
215
+ * NOTE: serious issues found with 2.17.0 lead to deprecation
216
+ * of this implementation -- basically it is possible to have
217
+ * unbalanced acquire/release success rate lead to excessive
218
+ * growth of pooled instances.
219
+ * See <a href="https://github.com/FasterXML/jackson-core/issues/1260">
220
+ * jackson-core#1260</a> for details.
221
+ *
222
+ * @deprecated Since 2.18: use other implementations instead
207
223
*/
208
- public static class LockFreePool extends LockFreePoolBase <BufferRecycler >
224
+ @ Deprecated
225
+ public static class LockFreePool extends RecyclerPool .LockFreePoolBase <BufferRecycler >
209
226
{
210
227
private static final long serialVersionUID = 1L ;
211
228
0 commit comments