public static class FixedSetSources.Builder extends Object
FixedSetSources
.Modifier and Type | Field and Description |
---|---|
static long |
DEFAULT_LATENCY_MS
the default latency (5000ms = five seconds).
|
Constructor and Description |
---|
Builder(Set<Source> sourceSet)
constructor from fixed source set.
|
Modifier and Type | Method and Description |
---|---|
FixedSetSources |
build()
builds a new instance of
FixedSetSources . |
CompilerFactory |
getCompilerFactory()
gets the compiler factory.
|
long |
getLatencyMs()
gets the latency in milliseconds.
|
String |
getName()
gets the sources name.
|
Set<Source> |
getSourceSet()
gets the fixed source set.
|
FixedSetSources.Builder |
setCompilerFactory(CompilerFactory compilerFactory)
sets the compiler factory for compiling sources, default
is a new instance of
DefaultGroovyCompilerFactory . |
FixedSetSources.Builder |
setLatencyMs(long latencyMs)
sets the latency in milliseconds for checking if script files
in the directory have changed, default is
DEFAULT_LATENCY_MS . |
FixedSetSources.Builder |
setName(String name)
sets the sources name, default is a generated random ID.
|
public static final long DEFAULT_LATENCY_MS
public Builder(Set<Source> sourceSet)
sourceSet
- fixed source setNullPointerException
- if the source set is nullpublic FixedSetSources.Builder setName(String name)
name
- sources nameIllegalStateException
- if the builder had already been used to build an instancepublic FixedSetSources.Builder setCompilerFactory(CompilerFactory compilerFactory)
DefaultGroovyCompilerFactory
.compilerFactory
- compiler factoryIllegalStateException
- if the builder had already been used to build an instancepublic FixedSetSources.Builder setLatencyMs(long latencyMs)
DEFAULT_LATENCY_MS
.latencyMs
- latency in millisecondsIllegalStateException
- if the builder had already been used to build an instancepublic Set<Source> getSourceSet()
public String getName()
public CompilerFactory getCompilerFactory()
public long getLatencyMs()
public FixedSetSources build()
FixedSetSources
.