Commit a1d2cbdd authored by MishaDemianenko's avatar MishaDemianenko
Browse files

Synchronize start and stop of services that restarted on master/slave

switch.
parent 34ba760d
No related merge requests found
Showing with 6 additions and 6 deletions
+6 -6
......@@ -51,7 +51,7 @@ public class DefaultFileSystemWatcherService implements FileSystemWatcherService
}
@Override
public void start()
public synchronized void start()
{
assert watcher == null;
watcher = fileWatchers.newThread( eventWatcher );
......@@ -59,7 +59,7 @@ public class DefaultFileSystemWatcherService implements FileSystemWatcherService
}
@Override
public void stop() throws Throwable
public synchronized void stop() throws Throwable
{
eventWatcher.stopWatching();
if ( watcher != null )
......
......@@ -31,13 +31,13 @@ public class StoreLockerLifecycleAdapter extends LifecycleAdapter
}
@Override
public void start()
public synchronized void start()
{
storeLocker.checkLock();
}
@Override
public void stop() throws Throwable
public synchronized void stop() throws Throwable
{
storeLocker.close();
}
......
......@@ -112,7 +112,7 @@ public class OnlineBackupKernelExtension extends LifecycleAdapter
}
@Override
public void start()
public synchronized void start()
{
if ( config.get( OnlineBackupSettings.online_backup_enabled ) )
{
......@@ -148,7 +148,7 @@ public class OnlineBackupKernelExtension extends LifecycleAdapter
}
@Override
public void stop() throws Throwable
public synchronized void stop() throws Throwable
{
if ( server != null )
{
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment