RecyclerPool
.@Deprecated public class BufferRecyclers extends Object
BufferRecycler
Modifier and Type | Field and Description |
---|---|
protected static ThreadLocal<SoftReference<BufferRecycler>> |
_recyclerRef
Deprecated.
This
ThreadLocal contains a SoftReference
to a BufferRecycler used to provide a low-cost
buffer recycling between reader and writer instances. |
static String |
SYSTEM_PROPERTY_TRACK_REUSABLE_BUFFERS
Deprecated.
System property that is checked to see if recycled buffers (see
BufferRecycler )
should be tracked, for purpose of forcing release of all such buffers, typically
during major garbage-collection. |
Constructor and Description |
---|
BufferRecyclers()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
static byte[] |
encodeAsUTF8(String text)
Deprecated.
Since 2.10 call
JsonStringEncoder.getInstance() and then
encodeAsUTF8() ) instead.
NOTE: was accidentally removed but reintroduced as deprecated in 2.12.5,
to be removed from 3.0) |
static BufferRecycler |
getBufferRecycler()
Deprecated.
Since 2.16 should use
RecyclerPool abstraction instead
of calling static methods of this class |
static JsonStringEncoder |
getJsonStringEncoder()
Deprecated.
Since 2.10 call
JsonStringEncoder.getInstance() instead.
NOTE: was accidentally removed but reintroduced as deprecated in 2.12.5,
to be removed from 3.0) |
static void |
quoteAsJsonText(CharSequence input,
StringBuilder output)
Deprecated.
Since 2.10 call
JsonStringEncoder.getInstance() and then
quoteAsString() ) instead.
NOTE: was accidentally removed but reintroduced as deprecated in 2.12.5,
to be removed from 3.0) |
static char[] |
quoteAsJsonText(String rawText)
Deprecated.
Since 2.10 call
JsonStringEncoder.getInstance() and then
quoteAsString() ) instead.
NOTE: was accidentally removed but reintroduced as deprecated in 2.12.5,
to be removed from 3.0) |
static byte[] |
quoteAsJsonUTF8(String rawText)
Deprecated.
Since 2.10 call
JsonStringEncoder.getInstance() (and then
quoteAsUTF8() ) instead.
NOTE: was accidentally removed but reintroduced as deprecated in 2.12.5,
to be removed from 3.0) |
static int |
releaseBuffers()
Deprecated.
Specialized method that will release all recycled
BufferRecycler if
(and only if) recycler tracking has been enabled
(see SYSTEM_PROPERTY_TRACK_REUSABLE_BUFFERS ). |
public static final String SYSTEM_PROPERTY_TRACK_REUSABLE_BUFFERS
BufferRecycler
)
should be tracked, for purpose of forcing release of all such buffers, typically
during major garbage-collection.protected static final ThreadLocal<SoftReference<BufferRecycler>> _recyclerRef
ThreadLocal
contains a SoftReference
to a BufferRecycler
used to provide a low-cost
buffer recycling between reader and writer instances.@Deprecated public static BufferRecycler getBufferRecycler()
RecyclerPool
abstraction instead
of calling static methods of this classBufferRecycler
instance.BufferRecycler
to usepublic static int releaseBuffers()
BufferRecycler
if
(and only if) recycler tracking has been enabled
(see SYSTEM_PROPERTY_TRACK_REUSABLE_BUFFERS
).
This method is usually called on shutdown of the container like Application Server
to ensure that no references are reachable via ThreadLocal
s as this may cause
unintentional retention of sizable amounts of memory. It may also be called regularly
if GC for some reason does not clear up SoftReference
s aggressively enough.@Deprecated public static JsonStringEncoder getJsonStringEncoder()
JsonStringEncoder.getInstance()
instead.
NOTE: was accidentally removed but reintroduced as deprecated in 2.12.5,
to be removed from 3.0)JsonStringEncoder
instance to use.@Deprecated public static byte[] encodeAsUTF8(String text)
JsonStringEncoder.getInstance()
and then
encodeAsUTF8()
) instead.
NOTE: was accidentally removed but reintroduced as deprecated in 2.12.5,
to be removed from 3.0)text
- String to encode@Deprecated public static char[] quoteAsJsonText(String rawText)
JsonStringEncoder.getInstance()
and then
quoteAsString()
) instead.
NOTE: was accidentally removed but reintroduced as deprecated in 2.12.5,
to be removed from 3.0)rawText
- String to quotechar[]
@Deprecated public static void quoteAsJsonText(CharSequence input, StringBuilder output)
JsonStringEncoder.getInstance()
and then
quoteAsString()
) instead.
NOTE: was accidentally removed but reintroduced as deprecated in 2.12.5,
to be removed from 3.0)input
- Textual content to quoteoutput
- Builder to append quoted content@Deprecated public static byte[] quoteAsJsonUTF8(String rawText)
JsonStringEncoder.getInstance()
(and then
quoteAsUTF8()
) instead.
NOTE: was accidentally removed but reintroduced as deprecated in 2.12.5,
to be removed from 3.0)rawText
- String to quotebyte[]
Copyright © 2008–2024 FasterXML. All rights reserved.