/** * Returns a valid Lettuce connection. Initializes and validates the connection if * {@link #setValidateConnection(boolean) enabled}. * * @return the connection. */ @Nullable StatefulConnection<E, E> getConnection() { synchronized (this.connectionMonitor) { if (this.connection == null) { this.connection = getNativeConnection(); } if (getValidateConnection()) { validateConnection(); } return this.connection; } }
/** * Returns a valid Lettuce connection. Initializes and validates the connection if * {@link #setValidateConnection(boolean) enabled}. * * @return the connection. */ @Nullable StatefulConnection<E, E> getConnection() { synchronized (this.connectionMonitor) { if (this.connection == null) { this.connection = getNativeConnection(); } if (getValidateConnection()) { validateConnection(); } return this.connection; } }
/** * Returns a valid Lettuce connection. Initializes and validates the connection if * {@link #setValidateConnection(boolean) enabled}. * * @return the connection. */ @Nullable StatefulConnection<E, E> getConnection() { synchronized (this.connectionMonitor) { if (this.connection == null) { this.connection = getNativeConnection(); } if (getValidateConnection()) { validateConnection(); } return this.connection; } }
/** * Validate the shared connections and reinitialize if invalid. */ public void validateConnection() { getOrCreateSharedConnection().validateConnection(); getOrCreateSharedReactiveConnection().validateConnection(); }
/** * Validate the shared connections and reinitialize if invalid. */ public void validateConnection() { getOrCreateSharedConnection().validateConnection(); getOrCreateSharedReactiveConnection().validateConnection(); }
/** * Validate the shared connections and reinitialize if invalid. */ public void validateConnection() { getOrCreateSharedConnection().validateConnection(); getOrCreateSharedReactiveConnection().validateConnection(); }