CassandraConnectionResolver

Helper class that resolves Cassandra connection and credential parameters, validates them and generates a connection URI.

Extends: CompositeConnectionResolver

Description

The CassandraConnectionResolver class is used to resolve Cassandra connections and credential parameters, validate them and generate connection URIs.

Important points

  • It is able to process multiple connections to Cassandra cluster nodes.

Configuration parameters

  • connection(s):
    • discovery_key: (optional) key to retrieve the connection from IDiscovery
    • host: host name or IP address
    • port: port number (default: 27017)
    • database: database name
    • uri: resource URI or connection string with all parameters in it
  • credential(s):
    • store_key: (optional) key to retrieve the credentials from ICredentialStore
    • username: username
    • password: user’s password

References

  • *:discovery:*:*:1.0 - (optional) IDiscovery services
  • *:credential-store:*:*:1.0 - (optional) ICredentialStore stores to resolve credentials

Fields

_connectionResolver

Connection resolver

protected _connectionResolver: ConnectionResolver

_credentialResolver

Credential resolver

protected _credentialResolver: CredentialResolver

Constructors

Creates an instance of this class.

public constructor()

Instance methods

mergeConnection

Merges connection options with connection parameters This method can be overriden in child classes.

protected mergeConnection(options: ConfigParams, connection: ConnectionParams): ConfigParams