com.ibm.cp4waiops.connectors.sdk.VaultHelper Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of connectors-sdk Show documentation
Show all versions of connectors-sdk Show documentation
A developer SDK for creating connectors for CP4WAIOps.
package com.ibm.cp4waiops.connectors.sdk;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.atomic.AtomicReference;
import io.micrometer.core.instrument.MeterRegistry;
/**
* A helper class to handle setting up a VaultInstance and recreating it when the config changes. Also handles token
* renewal.
*
* @deprecated Do not use vault as it has been removed from CPAIOps
*/
@Deprecated(since = "1.5.0")
public class VaultHelper implements AutoCloseable {
AtomicReference _instance;
/**
* Constructs a new vault instance
*
* @deprecated Do not use vault as it has been removed from CPAIOps
*
* @param config
* source of configuration values
* @param scheduler
* handles periodic tasks
* @param registry
* stores request metrics
*/
public VaultHelper(ConnectorManagerConfig config, ScheduledExecutorService scheduler, MeterRegistry registry) {
// Vault will be deprecated, for the first stage, the class cannot be removed
// So the logic will be removed here
}
@Override
public void close() {
// Do nothing, since the task to auto renew was removed from
}
/**
* @deprecated Do not use vault as it has been removed from CPAIOps
*
* @return the current vault instance
*/
public VaultInstance getInstance() {
return _instance.get();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy