Make checkpoint() method void (return value is not used)
This commit is contained in:
@@ -189,6 +189,6 @@ public class AbstractDao {
|
||||
this.daoHelper = daoHelper;
|
||||
}
|
||||
|
||||
public boolean checkpoint() { return daoHelper.checkpoint(); }
|
||||
public void checkpoint() { daoHelper.checkpoint(); }
|
||||
|
||||
}
|
||||
|
||||
@@ -52,8 +52,6 @@ public interface DaoHelper {
|
||||
*
|
||||
* Database checkpoints will make sure that the database is written on the disk
|
||||
* and optimize on-disk storage.
|
||||
*
|
||||
* @return true if the checkpoint succeeded, false otherwise
|
||||
*/
|
||||
public default boolean checkpoint() { return false; }
|
||||
public default void checkpoint() { }
|
||||
}
|
||||
|
||||
@@ -23,13 +23,12 @@ public class LegacyHsqlDaoHelper extends GenericDaoHelper {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkpoint() {
|
||||
public void checkpoint() {
|
||||
// HSQLDB (at least version 1) does not handle automatic checkpoints very well by default.
|
||||
// This makes sure the temporary log is actually written to more persistent storage.
|
||||
LOG.info("Database checkpoint in progress...");
|
||||
getJdbcTemplate().execute("CHECKPOINT DEFRAG");
|
||||
LOG.info("Database checkpoint complete.");
|
||||
return true;
|
||||
}
|
||||
|
||||
@PreDestroy
|
||||
|
||||
Reference in New Issue
Block a user