Top Description Fields Constructors Methods
com.fasterxml.jackson.dataformat.avro.apacheimpl

public final Class ApacheCodecRecycler

extends Object
implements RecyclerPool.WithPool<ApacheCodecRecycler>
Class Inheritance
All Implemented Interfaces
com.fasterxml.jackson.core.util.RecyclerPool.WithPool
Imports
java.util.Objects, java.util.concurrent.atomic.AtomicReference, com.fasterxml.jackson.core.util.RecyclerPool, .RecyclerPool.WithPool, org.apache.avro.io.*

Simple helper class that contains extracted functionality for simple encoder/decoder recycling.
Since
2.8.7

Field Summary

Modifier and TypeField and Description
private RecyclerPool<ApacheCodecRecycler>
private final AtomicReference<BinaryDecoder>
private final AtomicReference<BinaryEncoder>

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public BinaryDecoder
public BinaryEncoder
public void
public void
public void
releaseToPool()

Implements com.fasterxml.jackson.core.util.RecyclerPool.WithPool.releaseToPool.

Method called when owner of this recycler no longer wishes use it; this should return it to pool passed via withPool() (if any).

public ApacheCodecRecycler
withPool(RecyclerPool<ApacheCodecRecycler>
Pool that "owns" pooled item
pool
)

Implements com.fasterxml.jackson.core.util.RecyclerPool.WithPool.withPool.

Method called by owner of this recycler instance, to provide reference to RecyclerPool into which instance is to be released (if any)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

_poolback to summary
private RecyclerPool<ApacheCodecRecycler> _pool
decoderRefback to summary
private final AtomicReference<BinaryDecoder> decoderRef
encoderRefback to summary
private final AtomicReference<BinaryEncoder> encoderRef

Constructor Detail

ApacheCodecRecyclerback to summary
pack-priv ApacheCodecRecycler()

Method Detail

acquireDecoderback to summary
public BinaryDecoder acquireDecoder()
acquireEncoderback to summary
public BinaryEncoder acquireEncoder()
releaseback to summary
public void release(BinaryDecoder dec)
releaseback to summary
public void release(BinaryEncoder enc)
releaseToPoolback to summary
public void releaseToPool()

Implements com.fasterxml.jackson.core.util.RecyclerPool.WithPool.releaseToPool.

Method called when owner of this recycler no longer wishes use it; this should return it to pool passed via withPool() (if any).

Annotations
@Override
Since
2.16
withPoolback to summary
public ApacheCodecRecycler withPool(RecyclerPool<ApacheCodecRecycler> pool)

Implements com.fasterxml.jackson.core.util.RecyclerPool.WithPool.withPool.

Method called by owner of this recycler instance, to provide reference to RecyclerPool into which instance is to be released (if any)

Parameters
pool:RecyclerPool<ApacheCodecRecycler>

Doc from com.fasterxml.jackson.core.util.RecyclerPool.WithPool.withPool.

Pool that "owns" pooled item

Returns:ApacheCodecRecycler

Doc from com.fasterxml.jackson.core.util.RecyclerPool.WithPool.withPool.

This item (for call chaining)

Annotations
@Override
Since
2.16