public interface PersistenceBackendFactory
PersistenceBackend
and PersistentStore
.
The creation can be configured using Resource.save(Map)
and Resource.load(Map)
option maps.
PersistenceOptionsBuilder
Modifier and Type | Field and Description |
---|---|
static String |
BACKEND_PROPERTY
The "back-end" property in the configuration file.
|
static String |
CONFIG_FILE
The name of the configuration file of a back-end persistence.
|
Modifier and Type | Method and Description |
---|---|
void |
copyBackend(PersistenceBackend from,
PersistenceBackend to)
Copies the content from a
PersistenceBackend to another. |
PersistenceBackend |
createPersistentBackend(File directory,
Map<?,?> options)
Creates a
PersistenceBackend in the given directory . |
PersistentStore |
createPersistentStore(PersistentResource resource,
PersistenceBackend backend,
Map<?,?> options)
Creates a
PersistentStore between the given resource and the given backend
according to the given options . |
PersistenceBackend |
createTransientBackend()
Creates an in-memory
PersistenceBackend . |
PersistentStore |
createTransientStore(PersistentResource resource,
PersistenceBackend backend)
|
static final String CONFIG_FILE
static final String BACKEND_PROPERTY
PersistenceBackend createTransientBackend()
PersistenceBackend
.PersistenceBackend createPersistentBackend(File directory, Map<?,?> options) throws InvalidDataStoreException
PersistenceBackend
in the given directory
.directory
- the directoryoptions
- the options that defines the behaviour of the back-endInvalidDataStoreException
- the invalid datastore exceptionPersistentStore createTransientStore(PersistentResource resource, PersistenceBackend backend)
resource
- the resourcebackend
- the back-endPersistentStore createPersistentStore(PersistentResource resource, PersistenceBackend backend, Map<?,?> options) throws InvalidDataStoreException, IllegalArgumentException
PersistentStore
between the given resource
and the given backend
according to the given options
.
The returned PersistentStore
may be a succession of several PersistentStore
.
resource
- the resourcebackend
- the back-endoptions
- the options that defines the behaviour of the back-endInvalidDataStoreException
- if there is at least one invalid value in options
, or if an option is
missingIllegalArgumentException
- if the given backend
is not an instance of the targeted PersistenceBackend
for this factoryvoid copyBackend(PersistenceBackend from, PersistenceBackend to)
PersistenceBackend
to another.from
- the back-end to copyto
- the destinationCopyright © 2013–2017 Atlanmod INRIA LINA Mines Nantes. All rights reserved.