Class YamlWritingMechanism
- java.lang.Object
-
- org.keycloak.models.map.storage.file.yaml.YamlWritingMechanism
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,WritingMechanism
public class YamlWritingMechanism extends Object implements WritingMechanism, Closeable
Mechanism which producesEvent
s for SnakeYaml v2Emitter
.- Author:
- vramik
-
-
Constructor Summary
Constructors Constructor Description YamlWritingMechanism(Consumer<org.snakeyaml.engine.v2.events.Event> consumer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
YamlWritingMechanism
writeMapping(Runnable task)
Writes a mapping, items of which are written using this mechanism in thetask
.YamlWritingMechanism
writeObject(Object value)
Writes a value of a primitive type (null
, boolean, number, String).YamlWritingMechanism
writePair(String key, Runnable task)
Writes a mapping key/value pair, items of which are written using this mechanism in thetask
.YamlWritingMechanism
writeSequence(Runnable task)
Writes a sequence, items of which are written using this mechanism in thetask
.
-
-
-
Constructor Detail
-
YamlWritingMechanism
public YamlWritingMechanism(Consumer<org.snakeyaml.engine.v2.events.Event> consumer)
-
-
Method Detail
-
close
public void close()
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-
writeMapping
public YamlWritingMechanism writeMapping(Runnable task)
Description copied from interface:WritingMechanism
Writes a mapping, items of which are written using this mechanism in thetask
.- Specified by:
writeMapping
in interfaceWritingMechanism
- Returns:
-
writeSequence
public YamlWritingMechanism writeSequence(Runnable task)
Description copied from interface:WritingMechanism
Writes a sequence, items of which are written using this mechanism in thetask
.- Specified by:
writeSequence
in interfaceWritingMechanism
- Returns:
-
writePair
public YamlWritingMechanism writePair(String key, Runnable task)
Description copied from interface:WritingMechanism
Writes a mapping key/value pair, items of which are written using this mechanism in thetask
.- Specified by:
writePair
in interfaceWritingMechanism
- Returns:
-
writeObject
public YamlWritingMechanism writeObject(Object value)
Description copied from interface:WritingMechanism
Writes a value of a primitive type (null
, boolean, number, String).- Specified by:
writeObject
in interfaceWritingMechanism
- Returns:
-
-