01: package org.ontoware.rdf2go.model;
02:
03: import org.ontoware.rdf2go.exception.ModelRuntimeException;
04:
05: /**
06: * Defining how and when changes are commit to underlying persistence layer.
07: *
08: * @author voelkel
09: *
10: */
11: public interface Commitable {
12:
13: /**
14: * Writes all changes to underlying persistence layer - if such a layer is
15: * used by the implementation. Otherwise nothing happens.
16: *
17: * @throws ModelRuntimeException
18: * if the commit could not be executed
19: */
20: public void commit() throws ModelRuntimeException;
21:
22: /**
23: *
24: * The default value is true.
25: *
26: * @param autocommit
27: * If true, all changes are immediately written to the underlying
28: * persistence layer, if any is used.
29: */
30: public void setAutocommit(boolean autocommit);
31:
32: }
|