Package oracle.pgx.config
Class PreloadGraphConfigBuilder
- java.lang.Object
-
- oracle.pgx.config.PreloadGraphConfigBuilder
-
@Generated({"common/config/src/templates/ConfigBuilder.stg","common/config/config.gradle"}) public final class PreloadGraphConfigBuilder extends java.lang.Object
Builder forPreloadGraphConfig
.
-
-
Constructor Summary
Constructors Constructor Description PreloadGraphConfigBuilder()
Constructs an empty PreloadGraphConfigBuilderPreloadGraphConfigBuilder(java.util.Map<PreloadGraphConfig.Field,java.lang.Object> values)
Constructs a PreloadGraphConfigBuilder initialized with the values from the given mapPreloadGraphConfigBuilder(PreloadGraphConfig config)
Constructs a PreloadGraphConfigBuilder initialized with the values from the given configPreloadGraphConfigBuilder(PreloadGraphConfigBuilder builder)
Constructs a PreloadGraphConfigBuilder initialized with the values from the given builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description PreloadGraphConfig
build()
Builds the PreloadGraphConfig with aparentPath
ofnull
.PreloadGraphConfig
build(java.lang.String parentPath)
Builds the PreloadGraphConfig.static PreloadGraphConfig
buildPreloadGraphConfig(java.util.function.Consumer<PreloadGraphConfigBuilder> builderSetup)
Builds aPreloadGraphConfig
in-placePreloadGraphConfigBuilder
clear()
Clears all values from the builderjava.util.Map<PreloadGraphConfig.Field,java.lang.Object>
getValues()
PreloadGraphConfigBuilder
putAll(java.util.Map<PreloadGraphConfig.Field,java.lang.Object> values)
Puts all values from the given map into this builder.PreloadGraphConfigBuilder
putAll(PreloadGraphConfig config)
Puts all values from the given config into this builderPreloadGraphConfigBuilder
setLoadAtServerInitialization(boolean loadAtServerInitialization)
if true, PGX will load the pre-loaded graph during the initialization of the engine, otherwise loads the graph after completing the engine initialization.PreloadGraphConfigBuilder
setName(java.lang.String name)
preloaded graph namePreloadGraphConfigBuilder
setPath(java.lang.String path)
uri to graph config filePreloadGraphConfigBuilder
setPublish(boolean publish)
whether or not this preloaded graph should be published.PreloadGraphConfigBuilder
setPublishWithSnapshots(boolean publishWithSnapshots)
whether or not this preloaded graph should be published together with its snapshots.java.io.InputStream
toInputStream()
java.lang.String
toString()
-
-
-
Constructor Detail
-
PreloadGraphConfigBuilder
public PreloadGraphConfigBuilder()
Constructs an empty PreloadGraphConfigBuilder
-
PreloadGraphConfigBuilder
public PreloadGraphConfigBuilder(java.util.Map<PreloadGraphConfig.Field,java.lang.Object> values)
Constructs a PreloadGraphConfigBuilder initialized with the values from the given map- Parameters:
values
- a map containing configuration values
-
PreloadGraphConfigBuilder
public PreloadGraphConfigBuilder(PreloadGraphConfig config)
Constructs a PreloadGraphConfigBuilder initialized with the values from the given config- Parameters:
config
- the configuration to take the values from
-
PreloadGraphConfigBuilder
public PreloadGraphConfigBuilder(PreloadGraphConfigBuilder builder)
Constructs a PreloadGraphConfigBuilder initialized with the values from the given builder- Parameters:
builder
- the builder to take the values from
-
-
Method Detail
-
buildPreloadGraphConfig
public static PreloadGraphConfig buildPreloadGraphConfig(java.util.function.Consumer<PreloadGraphConfigBuilder> builderSetup)
Builds aPreloadGraphConfig
in-place- Parameters:
builderSetup
- a consumer to setup a newly createdPreloadGraphConfig
-
putAll
public PreloadGraphConfigBuilder putAll(java.util.Map<PreloadGraphConfig.Field,java.lang.Object> values)
Puts all values from the given map into this builder.- Parameters:
values
- the values to put in the builder
-
putAll
public PreloadGraphConfigBuilder putAll(PreloadGraphConfig config)
Puts all values from the given config into this builder- Parameters:
config
- the config to take the values from
-
clear
public PreloadGraphConfigBuilder clear()
Clears all values from the builder
-
build
public PreloadGraphConfig build(java.lang.String parentPath)
Builds the PreloadGraphConfig.- Parameters:
parentPath
- if not null, resolves relative paths against this parentPath- Returns:
- an instance of PreloadGraphConfig
-
build
public PreloadGraphConfig build()
Builds the PreloadGraphConfig with aparentPath
ofnull
.- Returns:
- An instance of PreloadGraphConfig
- See Also:
build(String)
-
toInputStream
public java.io.InputStream toInputStream()
- Returns:
- an
InputStream
representing the config
-
getValues
public java.util.Map<PreloadGraphConfig.Field,java.lang.Object> getValues()
- Returns:
- the raw config values
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
setPath
public PreloadGraphConfigBuilder setPath(java.lang.String path)
uri to graph config file
-
setName
public PreloadGraphConfigBuilder setName(java.lang.String name)
preloaded graph name
-
setLoadAtServerInitialization
public PreloadGraphConfigBuilder setLoadAtServerInitialization(boolean loadAtServerInitialization)
if true, PGX will load the pre-loaded graph during the initialization of the engine, otherwise loads the graph after completing the engine initialization.
-
setPublish
public PreloadGraphConfigBuilder setPublish(boolean publish)
whether or not this preloaded graph should be published. If published, any session can reference it by name. If this option is set to true, "publish_with_snapshots" must be set to false
-
setPublishWithSnapshots
public PreloadGraphConfigBuilder setPublishWithSnapshots(boolean publishWithSnapshots)
whether or not this preloaded graph should be published together with its snapshots. If published this way, any session can reference it by name and can set any snapshot. If this option is set to true, "publish" must be set to false.
-
-