@Deprecated public class ConnectionStore extends Object
ConnectionStore manages all the connections defined.
It manages the lifecycle of the Connection including all CRUD operations.
The store is backed by a table with namespace, id, type, name, description, properties, created, and updated columns.
The primary key is the namespace and id.| Modifier and Type | Field and Description |
|---|---|
static io.cdap.cdap.spi.data.table.StructuredTableSpecification |
TABLE_SPEC
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
connectionExists(Namespace namespace,
String connectionName)
Deprecated.
Returns true if connection identified by connectionName already exists.
|
NamespacedId |
create(Namespace namespace,
ConnectionMeta meta)
Deprecated.
Creates an entry in the
ConnectionStore for object Connection. |
NamespacedId |
create(Namespace namespace,
ConnectionMeta meta,
boolean preconfigured)
Deprecated.
|
void |
delete(NamespacedId id)
Deprecated.
Deletes the specified connection.
|
void |
deleteAll(io.cdap.cdap.api.NamespaceSummary namespace)
Deprecated.
Delete all connection with the namespace and generation id
|
Connection |
get(NamespacedId id)
Deprecated.
Get the specified connection.
|
static ConnectionStore |
get(io.cdap.cdap.spi.data.StructuredTableContext context)
Deprecated.
|
static String |
getConnectionId(String name)
Deprecated.
Get connection id for the given connection name
|
List<Connection> |
list(Namespace namespace,
io.cdap.cdap.api.Predicate<Connection> filter)
Deprecated.
Scans the namespace to list all the keys applying the filter.
|
void |
update(NamespacedId id,
ConnectionMeta meta)
Deprecated.
Updates an existing connection in the store.
|
public static final io.cdap.cdap.spi.data.table.StructuredTableSpecification TABLE_SPEC
public static ConnectionStore get(io.cdap.cdap.spi.data.StructuredTableContext context)
public NamespacedId create(Namespace namespace, ConnectionMeta meta) throws ConnectionAlreadyExistsException, IOException
ConnectionStore for object Connection.
This method creates the id and returns if after successfully updating the store.meta - the metadata of the connection createConnectionAlreadyExistsException - if the connection already existsIOExceptionpublic NamespacedId create(Namespace namespace, ConnectionMeta meta, boolean preconfigured) throws ConnectionAlreadyExistsException, IOException
public Connection get(NamespacedId id) throws ConnectionNotFoundException, IOException
id - the id of the connectionConnectionNotFoundException - if the connection does not existIOExceptionpublic void update(NamespacedId id, ConnectionMeta meta) throws ConnectionNotFoundException, IOException
id - the id of the object to be updatemeta - metadata to updateConnectionNotFoundException - if the specified connection does not existIOExceptionpublic void delete(NamespacedId id) throws IOException
id - the connection to deleteIOExceptionpublic boolean connectionExists(Namespace namespace, String connectionName) throws IOException
IOExceptionpublic List<Connection> list(Namespace namespace, io.cdap.cdap.api.Predicate<Connection> filter) throws IOException
filter - to be applied on the data being returned.IOExceptionpublic void deleteAll(io.cdap.cdap.api.NamespaceSummary namespace)
throws IOException
IOExceptionCopyright © 2021 CDAP Licensed under the Apache License, Version 2.0.