Skip to content

Commit

Permalink
Update StorageLockFileManager.java
Browse files Browse the repository at this point in the history
  • Loading branch information
hg-ms committed Sep 25, 2024
1 parent 6df0215 commit dc58b88
Showing 1 changed file with 25 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,30 @@

public interface StorageLockFileManager extends Runnable
{
/**
* Start periodical lock file checks.
*
* @return this
*/
public StorageLockFileManager start();

/**
* Stop periodical lock file checks
*
* @return this
*/
public StorageLockFileManager stop();

/**
* Initialize the lock file manager without starting any periodical actions.
*/
public void initialize();

/**
* Check if the StorageLockFileManager has been successfully initialized and is ready to start.
*
* @return true if {@link #initialize()} was successfully executed.
*/
public boolean isInitialized();


Expand Down Expand Up @@ -118,6 +136,7 @@ public final class Default implements StorageLockFileManager
// methods //
////////////


@Override
public final synchronized boolean isInitialized()
{
Expand Down Expand Up @@ -189,9 +208,15 @@ public StorageLockFileManager stop()
this.ensureClosedLockFile(null);
}

logger.info("Storage Lock File Manager stopped");

return this;
}

/**
* Initialize the storage lock file manager without starting the periodical
* lock file check.
*/
@Override
public void initialize()
{
Expand Down

0 comments on commit dc58b88

Please sign in to comment.