public abstract class ALfnEngineEnvironment extends Object
The engine environment also provides configuration of the execution environment. The following configurations are provided:
The environment also provides support for custom data formats:
the composite format
newInstance(ALfnEnvironment)
,
newInstance(ALfnEnvironment, Supplier)
Modifier | Constructor and Description |
---|---|
protected |
ALfnEngineEnvironment()
Deprecated.
Do not use this constructor. You are not supposed to create subclasses of this class. Use
the
newInstance(com.luciad.fusion.core.ALfnEnvironment) method instead. |
Modifier and Type | Method and Description |
---|---|
abstract void |
close()
Closes this environment and releases all its resources.
|
abstract File |
getCheckpointDirectory()
Deprecated.
This setting is not used anymore.
Fusion engine checkpoints are now stored in the coverage
user data
on the Tile Store. Using null to disable checkpoints is still valid, but instead
you should set the checkpoint interval to
-1 (you can set it on the session builders for raster or
vector data). |
abstract TLfnCompositeFormat |
getCompositeFormat()
Returns the composite format that is used by the engine session to decode the source assets.
|
abstract int |
getDefaultTileSize(ELfnDataType aDataType)
Gets the default tile size for a data type.
|
abstract int |
getEngineThreadCount()
Gets the number of threads used by an engine.
|
abstract ALfnEnvironment |
getEnvironment()
Returns the core environment.
|
ALcdImagingEngine |
getImagingEngine()
Gets the imaging engine for the environment, which may be
null to indicate that fusion should use the
default imaging engine. |
abstract ILcdModelReferenceDecoder |
getModelReferenceDecoder()
Gets the model reference decoder.
|
abstract File |
getS63PermitDirectory()
Gets the directory containing all the S-63 permits.
|
static ALfnEngineEnvironment |
newInstance(ALfnEnvironment aEnvironment)
|
static ALfnEngineEnvironment |
newInstance(ALfnEnvironment aEnvironment,
Supplier<List<ALfnFormat>> aFormatSupplier)
Creates a new engine environment that uses the given supported formats.
|
abstract void |
setCheckpointDirectory(File aCheckpointDirectory)
Deprecated.
This setting is not used anymore.
Fusion engine checkpoints are now stored in the coverage
user data
on the Tile Store. Using null to disable checkpoints is still valid, but instead
you should set the checkpoint interval to
-1 (you can set it on the session builders for raster or
vector data). |
abstract void |
setDefaultTileSize(ELfnDataType aDataType,
int aTileSize)
Sets the default tile size for a data type.
|
abstract void |
setEngineThreadCount(int aThreadCount)
Sets the thread count for engines.
|
abstract void |
setModelReferenceDecoder(ILcdModelReferenceDecoder aModelReferenceDecoder)
Sets a model reference decoder.
|
abstract void |
setS63PermitDirectory(File aDir)
Sets the S-63 permit directory on this engine environment.
|
protected ALfnEngineEnvironment()
newInstance(com.luciad.fusion.core.ALfnEnvironment)
method instead.newInstance(com.luciad.fusion.core.ALfnEnvironment)
method instead.public static ALfnEngineEnvironment newInstance(ALfnEnvironment aEnvironment)
aEnvironment
- the core environment.public static ALfnEngineEnvironment newInstance(ALfnEnvironment aEnvironment, Supplier<List<ALfnFormat>> aFormatSupplier)
aEnvironment
- the core environment.aFormatSupplier
- the supplier of formats to decode the source assetspublic abstract ALfnEnvironment getEnvironment()
public abstract TLfnCompositeFormat getCompositeFormat()
The format initially has all the supported formats defined by ALfnFormat.createDefaultFormats(ALfnEngineEnvironment)
when the environment is created with newInstance(ALfnEnvironment)
,
or newInstance(ALfnEnvironment, Supplier)
when the supplier is null
.
If the supplier is not null the format initially has all the formats provided through the supplier.
formats can be removed and additional ones registered.
These formats and can be used for registering formats that need to be processed
by the fusion engine.
public abstract ILcdModelReferenceDecoder getModelReferenceDecoder()
public abstract void setModelReferenceDecoder(ILcdModelReferenceDecoder aModelReferenceDecoder)
aModelReferenceDecoder
- a model reference decodergetModelReferenceDecoder()
public abstract File getCheckpointDirectory()
user data
on the Tile Store. Using null
to disable checkpoints is still valid, but instead
you should set the checkpoint interval
to
-1
(you can set it on the session builders for raster
or
vector
data).null
public abstract void setCheckpointDirectory(File aCheckpointDirectory)
user data
on the Tile Store. Using null
to disable checkpoints is still valid, but instead
you should set the checkpoint interval
to
-1
(you can set it on the session builders for raster
or
vector
data).null
.
When the directory is null
, the saving of checkpoints is disabled. There are configurations where this is
may be required, depending on three settings:
PER_TILE
or PER_COVERAGE
(see ALfnTileStore.CommitPolicy
)TLfnRasterCoverageMetadata.Builder.levelsToProduce(int[])
)PER_COVERAGE
commit policy → all levels
must be produced. This is currently only supported for raster sessions. Vector sessions
always combine all except the most detailed level.PER_TILE
.PER_COVERAGE
+ not all levels produced → saving of checkpoints must be
disabled.aCheckpointDirectory
- the new directory for storing checkpointsgetCheckpointDirectory()
public abstract int getEngineThreadCount()
public abstract void setEngineThreadCount(int aThreadCount)
aThreadCount
- the new thread countgetEngineThreadCount()
public abstract int getDefaultTileSize(ELfnDataType aDataType)
The standard tile sizes are 256
for image and 64
for elevation.
aDataType
- the data typeTLfnRasterCoverageMetadata.getTileWidth()
,
TLfnRasterCoverageMetadata.getTileHeight()
public abstract void setDefaultTileSize(ELfnDataType aDataType, int aTileSize)
aDataType
- the data typeaTileSize
- the tile sizegetDefaultTileSize(com.luciad.fusion.tilestore.ELfnDataType)
public abstract void close() throws IOException, InterruptedException
finalize()
.
This may happen at an undetermined time in the future, if at all.
If you have time-dependent code that relies on the client environment being closed at a specific point in time, you should explicitly close it.
Closing the client environment multiple times does not throw and has the same effect as closing it once.IOException
- in case of an I/O failureInterruptedException
- when the closing is interruptedpublic abstract File getS63PermitDirectory()
"<user.home>/.luciadfusion/Permits/S-63"
.public abstract void setS63PermitDirectory(File aDir)
"com.luciad.fusion.engine.s63PermitDirectory"
.
"<user.home>/.luciadfusion/Permits/S-63"
.
Setting the S-63 permit directory is a configuration action.
All configuration actions must be done before the engine environment is used.
If you call this method, you must do so before calling getCompositeFormat()
,
otherwise an IllegalStateException
will be thrown.
aDir
- The S-63 permit directory, or null
to clear the override and fall back to the system property or the default.IllegalStateException
- If you call this method after you've already started using this engine environment.public ALcdImagingEngine getImagingEngine()
null
to indicate that fusion should use the
default imaging engine.null