public class DBM extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
APPLY |
static String |
DBM |
static String |
MANUAL |
static String |
ROLLBACK |
| Constructor and Description |
|---|
DBM(ConnectionInfo ci,
File p) |
DBM(String driver,
String url,
String user,
String pass,
File p) |
| Modifier and Type | Method and Description |
|---|---|
void |
apply(String version) |
void |
destroy() |
void |
executeActionsWithLock(List<Action> actions) |
void |
executeActionWithLock(Action a) |
boolean |
executeStatement(SQLStatement sql) |
DBVersion |
findPreviousDBApply(Version version) |
void |
forceUnlock(String id) |
Version |
getCurrentDBVersion() |
DBMData |
getDBMData() |
DBMLock |
getExistingLock() |
Version |
getMaxDiskVersion() |
void |
init() |
void |
initDB() |
DBMLock |
lock() |
void |
reapply(String version) |
List<Action> |
recommendUpdateActions()
This method makes logical comparisons between disk and db versions
and recommends actions to bring the two in sync.
|
boolean |
reloadDBVersions() |
List<DiskVersion> |
reloadDiskVersions() |
void |
rollback(String version) |
void |
setVersion(String ver)
Manually sets the version to some value.
|
void |
showDBHistory() |
void |
showDiskVersions() |
void |
showVersionStatus() |
void |
unlock(DBMLock lock) |
void |
updateAll() |
public static final String DBM
public static final String APPLY
public static final String ROLLBACK
public static final String MANUAL
public DBM(String driver, String url, String user, String pass, File p) throws SQLException
SQLExceptionpublic DBM(ConnectionInfo ci, File p) throws SQLException
SQLExceptionpublic DBMData getDBMData()
public void init()
throws IOException,
SQLException
IOExceptionSQLExceptionpublic void destroy()
public void initDB()
throws SQLException,
IOException
SQLExceptionIOExceptionpublic void showVersionStatus()
throws NoSuchMethodException,
SecurityException,
IllegalAccessException,
IllegalArgumentException,
InvocationTargetException,
IOException,
SQLException
public boolean reloadDBVersions()
throws SQLException
SQLExceptionpublic List<DiskVersion> reloadDiskVersions() throws IOException
IOExceptionpublic Version getMaxDiskVersion() throws IOException
IOExceptionpublic void setVersion(String ver) throws SQLException, NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, IOException
public void reapply(String version) throws SQLException, InterruptedException
SQLExceptionInterruptedExceptionpublic void rollback(String version) throws SQLException, IOException, InterruptedException
public void apply(String version) throws SQLException, IOException, InterruptedException
public List<Action> recommendUpdateActions() throws IOException, SQLException
IOExceptionSQLExceptionpublic void executeActionWithLock(Action a) throws SQLException, InterruptedException
SQLExceptionInterruptedExceptionpublic void executeActionsWithLock(List<Action> actions) throws SQLException, InterruptedException
SQLExceptionInterruptedExceptionpublic void updateAll()
throws SQLException,
IOException,
InterruptedException
public Version getCurrentDBVersion() throws SQLException
SQLExceptionpublic DBMLock getExistingLock() throws SQLException
SQLExceptionpublic boolean executeStatement(SQLStatement sql) throws SQLException
SQLExceptionpublic DBMLock lock() throws InterruptedException, SQLException
InterruptedExceptionSQLExceptionpublic void unlock(DBMLock lock) throws SQLException
SQLExceptionpublic void forceUnlock(String id) throws SQLException
SQLExceptionCopyright © 2014. All rights reserved.