Skip to content

Commit

Permalink
Convert all private methods to protected methods to allow for overrid…
Browse files Browse the repository at this point in the history
…ing in any extending class
  • Loading branch information
Cliftonz committed May 21, 2022
1 parent 90ce314 commit f2f2ef3
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
import static java.util.ResourceBundle.getBundle;

public class StandardLockService implements LockService {
private static final ResourceBundle coreBundle = getBundle("liquibase/i18n/liquibase-core");
protected static final ResourceBundle coreBundle = getBundle("liquibase/i18n/liquibase-core");

protected Database database;

Expand Down Expand Up @@ -70,7 +70,7 @@ public void setDatabase(Database database) {
this.database = database;
}

public Long getChangeLogLockWaitTime() {
protected Long getChangeLogLockWaitTime() {
if (changeLogLockPollRate != null) {
return changeLogLockPollRate;
}
Expand All @@ -82,7 +82,7 @@ public void setChangeLogLockWaitTime(long changeLogLockWaitTime) {
this.changeLogLockPollRate = changeLogLockWaitTime;
}

public Long getChangeLogLockRecheckTime() {
protected Long getChangeLogLockRecheckTime() {
if (changeLogLockRecheckTime != null) {
return changeLogLockRecheckTime;
}
Expand Down Expand Up @@ -187,7 +187,7 @@ public boolean isDatabaseChangeLogLockTableInitialized(final boolean tableJustCr
* Determine whether the databasechangeloglock table has been initialized.
* @param forceRecheck if true, do not use any cached information, and recheck the actual database
*/
private boolean isDatabaseChangeLogLockTableInitialized(final boolean tableJustCreated, final boolean forceRecheck) {
protected boolean isDatabaseChangeLogLockTableInitialized(final boolean tableJustCreated, final boolean forceRecheck) {
if (!isDatabaseChangeLogLockTableInitialized || forceRecheck) {
Executor executor = Scope.getCurrentScope().getSingleton(ExecutorService.class).getExecutor("jdbc", database);

Expand Down Expand Up @@ -222,7 +222,7 @@ public boolean hasChangeLogLock() {
* Check whether the databasechangeloglock table exists in the database.
* @param forceRecheck if true, do not use any cached information and check the actual database
*/
private boolean hasDatabaseChangeLogLockTable(boolean forceRecheck) {
protected boolean hasDatabaseChangeLogLockTable(boolean forceRecheck) {
if (forceRecheck || hasDatabaseChangeLogLockTable == null) {
try {
hasDatabaseChangeLogLockTable = SnapshotGeneratorFactory.getInstance()
Expand All @@ -234,7 +234,7 @@ private boolean hasDatabaseChangeLogLockTable(boolean forceRecheck) {
return hasDatabaseChangeLogLockTable;
}

public boolean hasDatabaseChangeLogLockTable() throws DatabaseException {
protected boolean hasDatabaseChangeLogLockTable() throws DatabaseException {
return hasDatabaseChangeLogLockTable(false);
}

Expand Down Expand Up @@ -331,6 +331,7 @@ public boolean acquireLock() throws LockException {
try {
database.rollback();
} catch (DatabaseException e) {

}
}

Expand Down

0 comments on commit f2f2ef3

Please sign in to comment.