# Class ConnectorRegistry (0.2.0)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [0.2.0 (latest)](https://docs.cloud.google.com/java/docs/reference/alloydb-jdbc-connector/latest/com.google.cloud.alloydb.ConnectorRegistry)
- [0.1.2](https://docs.cloud.google.com/java/docs/reference/alloydb-jdbc-connector/0.1.2/com.google.cloud.alloydb.ConnectorRegistry)

    public final class ConnectorRegistry

Configure the AlloyDB JDBC Connector.

## Inheritance

[java.lang.Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \> ConnectorRegistry

## Inherited Members

[Object.clone()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--) [Object.equals(Object)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-) [Object.finalize()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--) [Object.getClass()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--) [Object.hashCode()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--) [Object.notify()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--) [Object.notifyAll()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--) [Object.toString()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--) [Object.wait()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--) [Object.wait(long)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-) [Object.wait(long,int)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-)

## Static Methods

### close(String name)

    public static void close(String name)

Close a named connector. This will stop all background credential refresh processes. All future
attempts to connect via this named connection will fail.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` the name of the connector to close. |

### register(String name, ConnectorConfig config)

    public static void register(String name, ConnectorConfig config)

Register a named connection so that it can later be referenced by name in a JDBC or R2DBC URL.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` the named connection name. |
| `config` | `https://docs.cloud.google.com/java/docs/reference/alloydb-jdbc-connector/latest/com.google.cloud.alloydb.ConnectorConfig` the full configuration of the connection. |

### reset()

    public static void reset()

Resets the entire AlloyDB JDBC Connector. This will stop all background threads. The next
attempt to open a connection or register a configuration will start a new ConnectorRegistry.

## Constructors

### ConnectorRegistry()

    public ConnectorRegistry()