public final class LoadSettingsBuilder extends Object
Constructor and Description |
---|
LoadSettingsBuilder()
Create builder
|
Modifier and Type | Method and Description |
---|---|
LoadSettings |
build()
Build immutable LoadSettings
|
LoadSettingsBuilder |
setAllowDuplicateKeys(boolean allowDuplicateKeys)
YAML 1.2 does require unique keys.
|
LoadSettingsBuilder |
setBufferSize(Integer bufferSize)
Buffer size for incoming data stream.
|
LoadSettingsBuilder |
setDefaultList(Function<Integer,List> defaultList)
Provide default List implementation.
|
LoadSettingsBuilder |
setDefaultMap(Function<Integer,Map> defaultMap)
Provide default Map implementation.
|
LoadSettingsBuilder |
setDefaultSet(Function<Integer,Set> defaultSet)
Provide default Set implementation.
|
LoadSettingsBuilder |
setLabel(String label)
Label for the input data.
|
LoadSettingsBuilder |
setRootConstructNode(Optional<ConstructNode> rootConstructNode)
Provide the factory to create Nodes.
|
LoadSettingsBuilder |
setScalarResolver(ScalarResolver scalarResolver)
Provide resolver to detect a tag by the value of a scalar
|
LoadSettingsBuilder |
setTagConstructors(Map<Tag,ConstructNode> tagConstructors)
Provide constructors for the specified tags.
|
LoadSettingsBuilder |
setUseMarks(boolean useMarks)
Marks are only used for error messages.
|
LoadSettingsBuilder |
setVersionFunction(Function<SpecVersion,SpecVersion> versionFunction)
Manage YAML directive value which defines the version of the YAML specification.
|
public LoadSettingsBuilder setLabel(String label)
label
- - meaningful label to indicate the input sourcepublic LoadSettingsBuilder setRootConstructNode(Optional<ConstructNode> rootConstructNode)
rootConstructNode
- - provided factory to create the root Nodepublic LoadSettingsBuilder setTagConstructors(Map<Tag,ConstructNode> tagConstructors)
tagConstructors
- - the map from a Tag to its constructorpublic LoadSettingsBuilder setScalarResolver(ScalarResolver scalarResolver)
scalarResolver
- - specified ScalarResolverpublic LoadSettingsBuilder setDefaultList(Function<Integer,List> defaultList)
ArrayList
is used if nothing provided.defaultList
- - specified List implementationpublic LoadSettingsBuilder setDefaultSet(Function<Integer,Set> defaultSet)
LinkedHashSet
is used if nothing provided.defaultSet
- - specified Set implementationpublic LoadSettingsBuilder setDefaultMap(Function<Integer,Map> defaultMap)
LinkedHashMap
is used if nothing provided.defaultMap
- - specified Map implementationpublic LoadSettingsBuilder setBufferSize(Integer bufferSize)
bufferSize
- - buffer size (in bytes) for input datapublic LoadSettingsBuilder setAllowDuplicateKeys(boolean allowDuplicateKeys)
allowDuplicateKeys
- - if true than the non-unique keys in a mapping are allowed (last key wins). False by default.public LoadSettingsBuilder setUseMarks(boolean useMarks)
useMarks
- - use false to save resources but use less informative error messages (no line and context)public LoadSettingsBuilder setVersionFunction(Function<SpecVersion,SpecVersion> versionFunction)
versionFunction
- - define the way to manage the YAML version. By default, 1.* versions are accepted
and treated as YAML 1.2. Other versions fail to parse (YamlVersionException is thown)public LoadSettings build()
Copyright © 2019 Hazelcast, Inc.. All rights reserved.