Skip to content

Commit 148acbf

Browse files
committed
removed unused code in ServiceUtils
1 parent 68f4cf3 commit 148acbf

File tree

1 file changed

+0
-22
lines changed

1 file changed

+0
-22
lines changed

base/src/main/java/com/instaclustr/cassandra/ldap/utils/ServiceUtils.java

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,7 @@
2424
import java.util.Iterator;
2525
import java.util.List;
2626
import java.util.ServiceLoader;
27-
import java.util.concurrent.Callable;
28-
import java.util.concurrent.ScheduledFuture;
29-
import java.util.concurrent.TimeUnit;
3027

31-
import org.apache.cassandra.auth.AuthKeyspace;
32-
import org.apache.cassandra.concurrent.ScheduledExecutors;
3328
import org.apache.cassandra.exceptions.ConfigurationException;
3429
import org.slf4j.Logger;
3530
import org.slf4j.LoggerFactory;
@@ -79,21 +74,4 @@ public static <T> T getService(final Class<T> clazz, final Class<? extends T> de
7974

8075
return services.get(0);
8176
}
82-
83-
public static ScheduledFuture<?> scheduleSetupTask(final Callable<Void> setupTask)
84-
{
85-
// The delay is to give the node a chance to see its peers before attempting the operation
86-
return ScheduledExecutors.optionalTasks.schedule(() ->
87-
{
88-
try
89-
{
90-
setupTask.call();
91-
} catch (Exception e)
92-
{
93-
e.printStackTrace();
94-
logger.info("Setup task in failed with error, rescheduling: {}", e.getMessage());
95-
scheduleSetupTask(setupTask);
96-
}
97-
}, AuthKeyspace.SUPERUSER_SETUP_DELAY, TimeUnit.MILLISECONDS);
98-
}
9977
}

0 commit comments

Comments
 (0)