public interface PersistenceBackend extends Closeable
PersistenceBackend
manage one single instance of a database.
It does not provide model-level translation; these functions are handled by DirectWriteStore
s.
Future: An abstraction of PersistenceBackend
s will be implemented to define a global behaviour. For
now, it provides only basic methods for closing or saving a model, but later, it will provide generic methods to add,
delete or get a value.
DirectWriteStore
Modifier and Type | Method and Description |
---|---|
void |
close()
In our case, it cleanly stops the underlying database.
|
default Object |
getAllInstances(EClass eClass,
boolean strict)
Back-end specific computation of
Resource.getAllContents() . |
boolean |
isClosed()
Returns whether the underlying database is closed.
|
void |
save()
Saves the modifications of the owned
EObject s in the underlying database. |
boolean isClosed()
true
if the database is closed, otherwise false
void close()
In our case, it cleanly stops the underlying database.
close
in interface AutoCloseable
close
in interface Closeable
void save()
EObject
s in the underlying database.default Object getAllInstances(EClass eClass, boolean strict)
Resource.getAllContents()
.eClass
- the class to compute the instances ofstrict
- true
if the lookup searches for strict instancesObject
containing the back-end specific objects corresponding to the instances of the EClass
UnsupportedOperationException
- if the back-end does not support all instances lookupCopyright © 2013–2017 Atlanmod INRIA LINA Mines Nantes. All rights reserved.