Class CachedDekRegistryClient
A caching DEK Registry client.
Inherited Members
Namespace: Confluent.SchemaRegistry.Encryption
Assembly: Confluent.SchemaRegistry.Encryption.dll
Syntax
public class CachedDekRegistryClient : IDekRegistryClient, IDisposable
Constructors
CachedDekRegistryClient(IEnumerable<KeyValuePair<string, string>>)
Initialize a new instance of the SchemaRegistryClient class.
Declaration
public CachedDekRegistryClient(IEnumerable<KeyValuePair<string, string>> config)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<KeyValuePair<string, string>> | config | Configuration properties. |
CachedDekRegistryClient(IEnumerable<KeyValuePair<string, string>>, IAuthenticationHeaderValueProvider, IWebProxy)
Initialize a new instance of the SchemaRegistryClient class with a custom IAuthenticationHeaderValueProvider
Declaration
public CachedDekRegistryClient(IEnumerable<KeyValuePair<string, string>> config, IAuthenticationHeaderValueProvider authenticationHeaderValueProvider, IWebProxy proxy = null)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<KeyValuePair<string, string>> | config | Configuration properties. |
| IAuthenticationHeaderValueProvider | authenticationHeaderValueProvider | The authentication header value provider |
| IWebProxy | proxy | The proxy server to use for connections |
Fields
DefaultEnableSslCertificateVerification
The default SSL server certificate verification for Schema Registry REST API calls.
Declaration
public const bool DefaultEnableSslCertificateVerification = true
Field Value
| Type | Description |
|---|---|
| bool |
DefaultMaxCachedKeys
The default maximum capacity of the local cache.
Declaration
public const int DefaultMaxCachedKeys = 1000
Field Value
| Type | Description |
|---|---|
| int |
DefaultMaxConnectionsPerServer
The default maximum number of connections per server.
Declaration
public const int DefaultMaxConnectionsPerServer = 20
Field Value
| Type | Description |
|---|---|
| int |
DefaultMaxRetries
The default maximum number of retries.
Declaration
public const int DefaultMaxRetries = 3
Field Value
| Type | Description |
|---|---|
| int |
DefaultRetriesMaxWaitMs
The default time to wait for any retry.
Declaration
public const int DefaultRetriesMaxWaitMs = 20000
Field Value
| Type | Description |
|---|---|
| int |
DefaultRetriesWaitMs
The default time to wait for the first retry.
Declaration
public const int DefaultRetriesWaitMs = 1000
Field Value
| Type | Description |
|---|---|
| int |
DefaultTimeout
The default timeout value for Schema Registry REST API calls.
Declaration
public const int DefaultTimeout = 30000
Field Value
| Type | Description |
|---|---|
| int |
Properties
MaxCachedKeys
The maximum capacity of the local cache.
Declaration
public int MaxCachedKeys { get; }
Property Value
| Type | Description |
|---|---|
| int |
Methods
CreateDekAsync(string, Dek)
Create a DEK.
Declaration
public Task<RegisteredDek> CreateDekAsync(string kekName, Dek dek)
Parameters
| Type | Name | Description |
|---|---|---|
| string | kekName | |
| Dek | dek |
Returns
| Type | Description |
|---|---|
| Task<RegisteredDek> |
CreateKekAsync(Kek, string)
Create a KEK.
Declaration
public Task<RegisteredKek> CreateKekAsync(Kek kek, string context = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Kek | kek | |
| string | context | The Schema Registry context the KEK belongs to, or null for the default context. |
Returns
| Type | Description |
|---|---|
| Task<RegisteredKek> |
Dispose()
Releases unmanaged resources owned by this CachedSchemaRegistryClient instance.
Declaration
public void Dispose()
Dispose(bool)
Releases the unmanaged resources used by this object and optionally disposes the managed resources.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | disposing | true to release both managed and unmanaged resources; false to release only unmanaged resources. |
GetDekAsync(string, string, DekFormat?, bool)
Get a DEK.
Declaration
public Task<RegisteredDek> GetDekAsync(string kekName, string subject, DekFormat? algorithm, bool ignoreDeletedDeks)
Parameters
| Type | Name | Description |
|---|---|---|
| string | kekName | |
| string | subject | |
| DekFormat? | algorithm | |
| bool | ignoreDeletedDeks |
Returns
| Type | Description |
|---|---|
| Task<RegisteredDek> |
GetDekLatestVersionAsync(string, string, DekFormat?, bool)
Get a DEK latest version.
Declaration
public Task<RegisteredDek> GetDekLatestVersionAsync(string kekName, string subject, DekFormat? algorithm, bool ignoreDeletedDeks)
Parameters
| Type | Name | Description |
|---|---|---|
| string | kekName | |
| string | subject | |
| DekFormat? | algorithm | |
| bool | ignoreDeletedDeks |
Returns
| Type | Description |
|---|---|
| Task<RegisteredDek> |
GetDekVersionAsync(string, string, int, DekFormat?, bool)
Get a DEK version.
Declaration
public Task<RegisteredDek> GetDekVersionAsync(string kekName, string subject, int version, DekFormat? algorithm, bool ignoreDeletedDeks)
Parameters
| Type | Name | Description |
|---|---|---|
| string | kekName | |
| string | subject | |
| int | version | |
| DekFormat? | algorithm | |
| bool | ignoreDeletedDeks |
Returns
| Type | Description |
|---|---|
| Task<RegisteredDek> |
GetDekVersionsAsync(string, string, DekFormat?, bool)
Get the list of DEK versions.
Declaration
public Task<List<int>> GetDekVersionsAsync(string kekName, string subject, DekFormat? algorithm, bool ignoreDeletedDeks)
Parameters
| Type | Name | Description |
|---|---|---|
| string | kekName | |
| string | subject | |
| DekFormat? | algorithm | |
| bool | ignoreDeletedDeks |
Returns
| Type | Description |
|---|---|
| Task<List<int>> |
GetDeksAsync(string, bool)
Get the list of DEKs.
Declaration
public Task<List<string>> GetDeksAsync(string kekName, bool ignoreDeletedDeks)
Parameters
| Type | Name | Description |
|---|---|---|
| string | kekName | |
| bool | ignoreDeletedDeks |
Returns
| Type | Description |
|---|---|
| Task<List<string>> |
GetKekAsync(string, bool, string)
Get a KEK by name.
Declaration
public Task<RegisteredKek> GetKekAsync(string name, bool ignoreDeletedKeks, string context = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | |
| bool | ignoreDeletedKeks | |
| string | context | The Schema Registry context the KEK belongs to, or null for the default context. |
Returns
| Type | Description |
|---|---|
| Task<RegisteredKek> |
GetKeksAsync(bool)
Get the list of KEKs.
Declaration
public Task<List<string>> GetKeksAsync(bool ignoreDeletedKeks)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | ignoreDeletedKeks |
Returns
| Type | Description |
|---|---|
| Task<List<string>> |
UpdateKekAsync(string, UpdateKek, string)
Update a KEK.
Declaration
public Task<RegisteredKek> UpdateKekAsync(string name, UpdateKek kek, string context = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | |
| UpdateKek | kek | |
| string | context | The Schema Registry context the KEK belongs to, or null for the default context. |
Returns
| Type | Description |
|---|---|
| Task<RegisteredKek> |