java.lang.Object
tools.jackson.core.TokenStreamFactory
tools.jackson.core.base.DecorableTSFactory
tools.jackson.core.base.BinaryTSFactory
tools.jackson.dataformat.avro.AvroFactory
- All Implemented Interfaces:
Serializable,tools.jackson.core.util.Snapshottable<tools.jackson.core.TokenStreamFactory>,tools.jackson.core.Versioned
Default
TokenStreamFactory implementation for encoding/decoding Avro
content, uses native Jackson encoder/decoder.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class tools.jackson.core.base.DecorableTSFactory
tools.jackson.core.base.DecorableTSFactory.DecorableTSFBuilder<F extends tools.jackson.core.TokenStreamFactory,T extends tools.jackson.core.TSFBuilder<F, T>> Nested classes/interfaces inherited from class tools.jackson.core.TokenStreamFactory
tools.jackson.core.TokenStreamFactory.Feature -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected tools.jackson.core.util.RecyclerPool<ApacheCodecRecycler>protected booleanFlag that is set if Apache Avro lib's decoder is to be used for decoding; `false` to use Jackson native Avro decoder.static final StringFields inherited from class tools.jackson.core.base.DecorableTSFactory
_generatorDecorators, _inputDecorator, _outputDecoratorFields inherited from class tools.jackson.core.TokenStreamFactory
_errorReportConfiguration, _factoryFeatures, _formatReadFeatures, _formatWriteFeatures, _recyclerPool, _streamReadConstraints, _streamReadFeatures, _streamWriteConstraints, _streamWriteFeatures, DEFAULT_FACTORY_FEATURE_FLAGS, DEFAULT_STREAM_READ_FEATURE_FLAGS, DEFAULT_STREAM_WRITE_FEATURE_FLAGS, EMPTY_WRITE_CONTEXT -
Constructor Summary
ConstructorsModifierConstructorDescriptionDefault constructor used to create factory instances.protectedAvroFactory(AvroFactory src) protectedConstructors used byAvroFactoryBuilderfor instantiation. -
Method Summary
Modifier and TypeMethodDescriptionprotected tools.jackson.core.JsonGenerator_createGenerator(tools.jackson.core.ObjectWriteContext writeCtxt, tools.jackson.core.io.IOContext ioCtxt, OutputStream out) protected AvroParser_createParser(tools.jackson.core.ObjectReadContext readCtxt, tools.jackson.core.io.IOContext ioCtxt, byte[] data, int offset, int len) protected tools.jackson.core.JsonParser_createParser(tools.jackson.core.ObjectReadContext readCtxt, tools.jackson.core.io.IOContext ioCtxt, DataInput input) protected AvroParser_createParser(tools.jackson.core.ObjectReadContext readCtxt, tools.jackson.core.io.IOContext ioCtxt, InputStream in) Overridable factory method that actually instantiates desired parser.static AvroFactoryBuilderbuilder()Main factory method to use for constructing a builder for creatingAvroFactoryinstances with different configuration.static AvroFactoryBuilderMain factory method to use for constructing a builder for creatingAvroFactoryinstances with different configuration, initialized to use Apache Avro library codec for decoding content (instead of Jackson native decoder).static AvroFactoryBuilderMain factory method to use for constructing a builder for creatingAvroFactoryinstances with different configuration, initialized to use Jackson antive codec for decoding content (instead of Apache Avro library decoder).booleanbooleanbooleancanUseSchema(tools.jackson.core.FormatSchema schema) copy()final booleanChecked whether specified parser feature is enabled.final booleanCheck whether specified generator feature is enabled.protected ObjectMethod that we need to override to actually make restoration go through constructors etc.rebuild()booleantools.jackson.core.TokenStreamFactorysnapshot()Instances are immutable so just return `this`tools.jackson.core.Versionversion()Methods inherited from class tools.jackson.core.base.BinaryTSFactory
_createContentReference, _createContentReference, _nonByteSource, _nonByteTarget, createGenerator, createGenerator, createGenerator, createGenerator, createParser, createParser, createParser, createParser, createParser, createParser, createParser, createParserMethods inherited from class tools.jackson.core.base.DecorableTSFactory
_copy, _decorate, _decorate, _decorate, _decorate, _decorate, _decorate, getGeneratorDecorators, getInputDecorator, getOutputDecoratorMethods inherited from class tools.jackson.core.TokenStreamFactory
_checkRangeBoundsForByteArray, _checkRangeBoundsForCharArray, _createContext, _createContext, _createDataOutputWrapper, _fileInputStream, _fileOutputStream, _getBufferRecycler, _getRecyclerPool, _optimizedStreamFromURL, _pathInputStream, _pathOutputStream, _reportRangeError, _unsupported, _unsupported, _wrapIOFailure, constructCINameMatcher, constructNameMatcher, createGenerator, createGenerator, createGenerator, createGenerator, createGenerator, createNonBlockingByteArrayParser, createNonBlockingByteBufferParser, createParser, createParser, createParser, createParser, createParser, createParser, createParser, createParser, createParser, createParser, errorReportConfiguration, getFactoryFeatures, getFormatReadFeatures, getFormatWriteFeatures, getStreamReadFeatures, getStreamWriteFeatures, isEnabled, isEnabled, isEnabled, streamReadConstraints, streamWriteConstraints
-
Field Details
-
FORMAT_NAME_AVRO
- See Also:
-
_avroRecyclerPool
- Since:
- 2.16
-
_useApacheLibDecoder
protected boolean _useApacheLibDecoderFlag that is set if Apache Avro lib's decoder is to be used for decoding; `false` to use Jackson native Avro decoder.
-
-
Constructor Details
-
AvroFactory
public AvroFactory()Default constructor used to create factory instances. Creation of a factory instance is a light-weight operation, but it is still a good idea to reuse limited number of factory instances (and quite often just a single instance): factories are used as context for storing some reused processing objects (such as symbol tables parsers use) and this reuse only works within context of a single factory instance. -
AvroFactory
-
AvroFactory
Constructors used byAvroFactoryBuilderfor instantiation.- Since:
- 3.0
-
-
Method Details
-
rebuild
- Specified by:
rebuildin classtools.jackson.core.TokenStreamFactory
-
builder
Main factory method to use for constructing a builder for creatingAvroFactoryinstances with different configuration. Builder is initialized to defaults and this is equivalent to callingbuilderWithNativeDecoder(). -
builderWithApacheDecoder
Main factory method to use for constructing a builder for creatingAvroFactoryinstances with different configuration, initialized to use Apache Avro library codec for decoding content (instead of Jackson native decoder). -
builderWithNativeDecoder
Main factory method to use for constructing a builder for creatingAvroFactoryinstances with different configuration, initialized to use Jackson antive codec for decoding content (instead of Apache Avro library decoder). -
copy
- Specified by:
copyin classtools.jackson.core.TokenStreamFactory
-
snapshot
public tools.jackson.core.TokenStreamFactory snapshot()Instances are immutable so just return `this`- Specified by:
snapshotin interfacetools.jackson.core.util.Snapshottable<tools.jackson.core.TokenStreamFactory>- Specified by:
snapshotin classtools.jackson.core.TokenStreamFactory
-
canHandleBinaryNatively
public boolean canHandleBinaryNatively()- Overrides:
canHandleBinaryNativelyin classtools.jackson.core.base.BinaryTSFactory
-
readResolve
Method that we need to override to actually make restoration go through constructors etc. Also: must be overridden by sub-classes as well. -
version
public tools.jackson.core.Version version()- Specified by:
versionin interfacetools.jackson.core.Versioned- Specified by:
versionin classtools.jackson.core.TokenStreamFactory
-
requiresPropertyOrdering
public boolean requiresPropertyOrdering()- Overrides:
requiresPropertyOrderingin classtools.jackson.core.TokenStreamFactory
-
canParseAsync
public boolean canParseAsync()- Specified by:
canParseAsyncin classtools.jackson.core.TokenStreamFactory
-
isEnabled
Checked whether specified parser feature is enabled. -
isEnabled
Check whether specified generator feature is enabled. -
getFormatName
- Specified by:
getFormatNamein classtools.jackson.core.TokenStreamFactory
-
canUseSchema
public boolean canUseSchema(tools.jackson.core.FormatSchema schema) - Specified by:
canUseSchemain classtools.jackson.core.TokenStreamFactory
-
getFormatReadFeatureType
- Overrides:
getFormatReadFeatureTypein classtools.jackson.core.TokenStreamFactory
-
getFormatWriteFeatureType
- Overrides:
getFormatWriteFeatureTypein classtools.jackson.core.TokenStreamFactory
-
_createParser
protected AvroParser _createParser(tools.jackson.core.ObjectReadContext readCtxt, tools.jackson.core.io.IOContext ioCtxt, InputStream in) throws tools.jackson.core.JacksonException Overridable factory method that actually instantiates desired parser.- Specified by:
_createParserin classtools.jackson.core.base.BinaryTSFactory- Throws:
tools.jackson.core.JacksonException
-
_createParser
protected AvroParser _createParser(tools.jackson.core.ObjectReadContext readCtxt, tools.jackson.core.io.IOContext ioCtxt, byte[] data, int offset, int len) throws tools.jackson.core.JacksonException - Specified by:
_createParserin classtools.jackson.core.base.BinaryTSFactory- Throws:
tools.jackson.core.JacksonException
-
_createParser
protected tools.jackson.core.JsonParser _createParser(tools.jackson.core.ObjectReadContext readCtxt, tools.jackson.core.io.IOContext ioCtxt, DataInput input) - Specified by:
_createParserin classtools.jackson.core.base.BinaryTSFactory
-
_createGenerator
protected tools.jackson.core.JsonGenerator _createGenerator(tools.jackson.core.ObjectWriteContext writeCtxt, tools.jackson.core.io.IOContext ioCtxt, OutputStream out) throws tools.jackson.core.JacksonException - Specified by:
_createGeneratorin classtools.jackson.core.base.BinaryTSFactory- Throws:
tools.jackson.core.JacksonException
-