| Modifier and Type | Field and Description |
|---|---|
static long |
DEFAULT_LATENCY_MS
the default latency (5000ms = five seconds).
|
| Constructor and Description |
|---|
Builder()
constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Grengine |
build()
builds a new instance of
Grengine. |
Engine |
getEngine()
gets the engine.
|
long |
getLatencyMs()
gets the latency in milliseconds.
|
SourceFactory |
getSourceFactory()
gets the source factory for creating sources.
|
List<Sources> |
getSourcesLayers()
gets the sources layers.
|
UpdateExceptionNotifier |
getUpdateExceptionNotifier()
gets the update notification notifier.
|
Grengine.Builder |
setEngine(Engine engine)
sets the engine, default is a new instance of
LayeredEngine
with default settings. |
Grengine.Builder |
setLatencyMs(long latencyMs)
sets the latency in milliseconds for checking if need to
recompile sources layers, default is
DEFAULT_LATENCY_MS. |
Grengine.Builder |
setSourceFactory(SourceFactory sourceFactory)
sets the source factory for creating sources, default is a new instance
of
DefaultSourceFactory with default settings. |
Grengine.Builder |
setSourcesLayers(List<Sources> sourcesLayers)
sets the sources layers, default is no layers.
|
Grengine.Builder |
setSourcesLayers(Sources... sourcesLayers)
sets the sources layers, default is no layers.
|
Grengine.Builder |
setUpdateExceptionNotifier(UpdateExceptionNotifier updateExceptionNotifier)
sets the update notification notifier, default none (null).
|
public static final long DEFAULT_LATENCY_MS
public Grengine.Builder setEngine(Engine engine)
LayeredEngine
with default settings.engine - engineIllegalStateException - if the builder had already been used to build an instancepublic Grengine.Builder setSourceFactory(SourceFactory sourceFactory)
DefaultSourceFactory with default settings.sourceFactory - source factoryIllegalStateException - if the builder had already been used to build an instancepublic Grengine.Builder setSourcesLayers(List<Sources> sourcesLayers)
sourcesLayers - sources layersIllegalStateException - if the builder had already been used to build an instancepublic Grengine.Builder setSourcesLayers(Sources... sourcesLayers)
sourcesLayers - sources layersIllegalStateException - if the builder had already been used to build an instancepublic Grengine.Builder setUpdateExceptionNotifier(UpdateExceptionNotifier updateExceptionNotifier)
updateExceptionNotifier - update notification notifierIllegalStateException - if the builder had already been used to build an instancepublic Grengine.Builder setLatencyMs(long latencyMs)
DEFAULT_LATENCY_MS.latencyMs - latency in millisecondsIllegalStateException - if the builder had already been used to build an instancepublic Engine getEngine()
public SourceFactory getSourceFactory()
public List<Sources> getSourcesLayers()
public UpdateExceptionNotifier getUpdateExceptionNotifier()
public long getLatencyMs()