Package org.apache.openjpa.jdbc.kernel
Class AbstractJDBCSavepointManager
- java.lang.Object
-
- org.apache.openjpa.jdbc.kernel.AbstractJDBCSavepointManager
-
- All Implemented Interfaces:
SavepointManager,Configurable
- Direct Known Subclasses:
JDBC3SavepointManager
public abstract class AbstractJDBCSavepointManager extends java.lang.Object implements SavepointManager, Configurable
AbstractSavepointManagerimplementation that delegates to the subclass for savepoint operations on the activeConnection. This implementation issues a flush and relies on the driver/db to restore back to the flushed state.- Since:
- 0.3.4
- Author:
- Steve Kim
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classAbstractJDBCSavepointManager.ConnectionSavepointA savepoint which provides access to the current transactional connection.
-
Constructor Summary
Constructors Constructor Description AbstractJDBCSavepointManager()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidendConfiguration()Invoked upon completion of bean property configuration for this object.booleangetRestoreFieldState()Return whether to retain in-memory copies of field values for restore on rollback.OpenJPASavepointnewSavepoint(java.lang.String name, Broker broker)Return a new savepoint for the given name, which may be null.protected abstract voidrollbackDataStore(AbstractJDBCSavepointManager.ConnectionSavepoint savepoint)Rollback the datastore savepoint.voidsetConfiguration(Configuration conf)Invoked prior to setting bean properties.protected abstract voidsetDataStore(AbstractJDBCSavepointManager.ConnectionSavepoint savepoint)Set the datastore savepoint.voidsetRestoreFieldState(boolean restore)Set whether to retain in-memory copies of field values for restore on rollback.voidstartConfiguration()Invoked before bean property configuration is begun on this object.booleansupportsIncrementalFlush()Return whether the savepoints generated by this manager can handle incremental flushes to the datastore.
-
-
-
Method Detail
-
startConfiguration
public void startConfiguration()
Description copied from interface:ConfigurableInvoked before bean property configuration is begun on this object.- Specified by:
startConfigurationin interfaceConfigurable
-
setConfiguration
public void setConfiguration(Configuration conf)
Description copied from interface:ConfigurableInvoked prior to setting bean properties.- Specified by:
setConfigurationin interfaceConfigurable
-
endConfiguration
public void endConfiguration()
Description copied from interface:ConfigurableInvoked upon completion of bean property configuration for this object.- Specified by:
endConfigurationin interfaceConfigurable
-
getRestoreFieldState
public boolean getRestoreFieldState()
Return whether to retain in-memory copies of field values for restore on rollback. Defaults to {@link OpenJPAConfiguration#getRestoreState).
-
setRestoreFieldState
public void setRestoreFieldState(boolean restore)
Set whether to retain in-memory copies of field values for restore on rollback. Defaults toOpenJPAConfiguration.getRestoreState().
-
newSavepoint
public OpenJPASavepoint newSavepoint(java.lang.String name, Broker broker)
Description copied from interface:SavepointManagerReturn a new savepoint for the given name, which may be null.- Specified by:
newSavepointin interfaceSavepointManager
-
supportsIncrementalFlush
public boolean supportsIncrementalFlush()
Description copied from interface:SavepointManagerReturn whether the savepoints generated by this manager can handle incremental flushes to the datastore.- Specified by:
supportsIncrementalFlushin interfaceSavepointManager
-
rollbackDataStore
protected abstract void rollbackDataStore(AbstractJDBCSavepointManager.ConnectionSavepoint savepoint)
Rollback the datastore savepoint.
-
setDataStore
protected abstract void setDataStore(AbstractJDBCSavepointManager.ConnectionSavepoint savepoint)
Set the datastore savepoint.
-
-