Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,5 @@ public interface HostListProvider {

HostSpec identifyConnection(Connection connection) throws SQLException;

String getClusterId() throws UnsupportedOperationException;
String getClusterId() throws UnsupportedOperationException, SQLException;
}
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,8 @@ public HostSpec identifyConnection(Connection connection) throws SQLException {
}

@Override
public String getClusterId() throws UnsupportedOperationException {
public String getClusterId() throws UnsupportedOperationException, SQLException {
init();
return this.clusterId;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,18 @@
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.locks.ReentrantLock;
import java.util.logging.Logger;
import org.checkerframework.checker.nullness.qual.NonNull;
import software.amazon.jdbc.AwsWrapperProperty;
import software.amazon.jdbc.HostSpec;
import software.amazon.jdbc.PluginService;
import software.amazon.jdbc.util.Messages;
import software.amazon.jdbc.util.SlidingExpirationCacheWithCleanupThread;
import software.amazon.jdbc.util.Utils;

public class LimitlessRouterServiceImpl implements LimitlessRouterService {
private static final Logger LOGGER =
Logger.getLogger(LimitlessRouterServiceImpl.class.getName());
public static final AwsWrapperProperty MONITOR_DISPOSAL_TIME_MS =
new AwsWrapperProperty(
"limitlessTransactionRouterMonitorDisposalTimeMs",
Expand Down Expand Up @@ -143,12 +147,13 @@ public void startMonitoring(final @NonNull HostSpec hostSpec,
.createLimitlessRouterMonitor(
hostSpec,
limitlessRouterCache,
this.pluginService.getHostListProvider().getClusterId(),
limitlessRouterMonitorKey,
props,
intervalMs),
cacheExpirationNano);
} catch (UnsupportedOperationException e) {
throw e;
} catch (SQLException e) {
LOGGER.warning(Messages.get("LimitlessRouterServiceImpl.errorStartingMonitor", new Object[]{e}));
throw new RuntimeException(e);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,9 @@ LimitlessRouterMonitor.openedConnection=Opened Limitless Router Monitor connecti
LimitlessRouterMonitor.running=Limitless Router Monitor thread running on node {0}.
LimitlessRouterMonitor.stopped=Limitless Router Monitor thread stopped on node {0].

# Limitless Router Service
LimitlessRouterServiceImpl.errorStartingMonitor=An error occurred while starting Limitless Router Monitor. {0}

# Log Query Connection Plugin
LogQueryConnectionPlugin.executingQuery=[{0}] Executing query: {1}

Expand Down
Loading