See: Description
Interface | Description |
---|---|
Config |
A configuration that builds the behavior of
BackendFactories and
StoreFactory . |
ImmutableConfig |
An immutable configuration that defines the behavior of
BackendFactories and StoreFactory . |
Class | Description |
---|---|
BaseConfig<C extends BaseConfig<C>> |
The base
Config that creates and manages common configuration that are available for all back-end
implementations. |
Exception | Description |
---|---|
InvalidConfigException |
Exception thrown if an error is detected when validating a
Config . |
NeoEMF can be customized by using specific options that are provided to the Resource.save(java.util.Map)
and Resource.load(java.util.Map)
methods. This package defines the base for
the configuration of all Backend
: Config
is a fluent API allowing to easily set NeoEMF configuration in client applications. Backend-specific builders are
also provided to integrate backend-related configuration.
These classes are used to create option maps used in EMF save and load methods. For example, the following
code creates a map that tells the framework to commit the pending transaction after 10000 operations, and cache the
accessed features to retrieve them efficiently. MyConfig corresponds to a backend-specific implementation of
Config
.
// Create the option map
Map<String, Object> options = new MyConfig()
.autocommit(10000)
.cacheFeatures()
.toMap();
// Load the resource with the specified options
myResource.load(options);
// Manipulate the resource with autocommit and feature cache enabled
myResource.getContents() [...]
Copyright © 2013–2019 Atlanmod. All rights reserved.