@ParametersAreNonnullByDefault public abstract class AbstractBackendFactory<C extends Config> extends AbstractMapperFactory implements BackendFactory
BackendFactory
.Modifier | Constructor and Description |
---|---|
protected |
AbstractBackendFactory(String name)
Constructs a new
AbstractBackendFactory . |
protected |
AbstractBackendFactory(String name,
boolean supportsTransient)
Constructs a new
AbstractBackendFactory . |
Modifier and Type | Method and Description |
---|---|
Backend |
createBackend(org.eclipse.emf.common.util.URI uri,
ImmutableConfig baseConfig)
Creates a new
Backend located by the uri . |
protected Backend |
createLocalBackend(Path directory,
C config)
Creates a new file-based
Backend . |
protected Backend |
createRemoteBackend(URL url,
C config)
Creates a new server-based
Backend . |
String |
name()
Returns the literal description of the created
Backend . |
boolean |
supportsTransient()
Returns whether the
Backend s created by this factory support the transient state. |
createMapper, createMapper
protected AbstractBackendFactory(String name)
AbstractBackendFactory
.name
- the literal description of this factoryprotected AbstractBackendFactory(String name, boolean supportsTransient)
AbstractBackendFactory
.name
- the literal description of this factorysupportsTransient
- true
if the backends created by this factory support the transient statepublic final String name()
BackendFactory
Backend
.name
in interface BackendFactory
Backend
public boolean supportsTransient()
BackendFactory
Backend
s created by this factory support the transient state.supportsTransient
in interface BackendFactory
true
if the Backend
s created by this factory support the transient state, false
otherwise@Nonnull public Backend createBackend(org.eclipse.emf.common.util.URI uri, ImmutableConfig baseConfig)
BackendFactory
Backend
located by the uri
.createBackend
in interface BackendFactory
uri
- the URI
where to store the back-endbaseConfig
- the base configuration that defines the behaviour of the back-end@Nonnull protected Backend createLocalBackend(Path directory, C config) throws Exception
Backend
.
By default, this method throws an UnsupportedOperationException
.
directory
- the file path where to store the databaseconfig
- the configuration that defines the behaviour of the back-endException
- if an error occurs during the back-end initializationCopyright © 2013–2019 Atlanmod. All rights reserved.