Skip to content

Commit

Permalink
Fixed import
Browse files Browse the repository at this point in the history
  • Loading branch information
viragtripathi committed Mar 30, 2023
1 parent 45d6231 commit 92a3694
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
import org.apache.commons.io.monitor.FileAlterationMonitor;
import org.apache.commons.io.monitor.FileAlterationObserver;

import static com.redis.benchmark.utils.JedisConnectionManagement.firstActiveIndex;

public final class FileEventListener {

public static final FileEventListener FILE_EVENT_LISTENER = new FileEventListener();
Expand All @@ -27,9 +29,9 @@ public void start(String dir, int pollInterval) throws Exception {
public void onFileCreate(File file) {
System.out.println("\nDetected file create event. File: " + file);
int failBackIndex = Integer.parseInt(file.getName().substring(0, 1));
JedisConnectionManagement.firstActiveIndex = failBackIndex;
firstActiveIndex = failBackIndex;
System.out.println("User have requested a fail-back event. Setting the active multi cluster index to " + failBackIndex);
JedisConnectionManagement.provider.setActiveMultiClusterIndex(JedisConnectionManagement.firstActiveIndex);
JedisConnectionManagement.provider.setActiveMultiClusterIndex(firstActiveIndex);
}

@Override
Expand Down

0 comments on commit 92a3694

Please sign in to comment.