@Generated(value="OracleSDKGenerator", comments="API Version: 20210216") public class DatabaseRecoveryAsyncClient extends BaseAsyncClient implements DatabaseRecoveryAsync
Async client implementation for DatabaseRecovery service.
There are two ways to use async client: 1. Use AsyncHandler: using AsyncHandler, if the response
to the call is an InputStream
, like getObject Api in object storage service,
developers need to process the stream in AsyncHandler, and not anywhere else, because the stream
will be closed right after the AsyncHandler is invoked.
2. Use Java Future: using Java Future, developers need to close the stream after they are done
with the Java Future.
Accessing the result should be done in a mutually exclusive manner, either through the Future or
the AsyncHandler, but not both. If the Future is used, the caller should pass in null as the
AsyncHandler. If the AsyncHandler is used, it is still safe to use the Future to determine
whether or not the request was completed via Future.isDone/isCancelled.
Please refer to
https://github.com/oracle/oci-java-sdk/blob/master/bmc-examples/src/main/java/ResteasyClientWithObjectStorageExample.java
Modifier and Type | Class and Description |
---|---|
static class |
DatabaseRecoveryAsyncClient.Builder
Builder class for this client.
|
Modifier and Type | Field and Description |
---|---|
String |
clientCommonLibraryVersion
Compatible SDK version, provided by the codegen.
|
Optional<String> |
minimumClientCommonLibraryVersionFromClient
Minimum compatible SDK version, maybe provided by the codegen.
|
static Service |
SERVICE
Service instance for DatabaseRecovery.
|
Constructor and Description |
---|
DatabaseRecoveryAsyncClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider,
ClientConfiguration configuration,
ClientConfigurator clientConfigurator,
RequestSignerFactory defaultRequestSignerFactory)
Deprecated.
Use the
builder instead. |
DatabaseRecoveryAsyncClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider,
ClientConfiguration configuration,
ClientConfigurator clientConfigurator,
RequestSignerFactory defaultRequestSignerFactory,
List<ClientConfigurator> additionalClientConfigurators)
Deprecated.
Use the
builder instead. |
DatabaseRecoveryAsyncClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider,
ClientConfiguration configuration,
ClientConfigurator clientConfigurator,
RequestSignerFactory defaultRequestSignerFactory,
List<ClientConfigurator> additionalClientConfigurators,
String endpoint)
Deprecated.
Use the
builder instead. |
DatabaseRecoveryAsyncClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider,
ClientConfiguration configuration,
ClientConfigurator clientConfigurator,
RequestSignerFactory defaultRequestSignerFactory,
Map<SigningStrategy,RequestSignerFactory> signingStrategyRequestSignerFactories,
List<ClientConfigurator> additionalClientConfigurators,
String endpoint)
Deprecated.
Use the
builder instead. |
DatabaseRecoveryAsyncClient(BasicAuthenticationDetailsProvider authenticationDetailsProvider)
Deprecated.
Use the
builder instead. |
DatabaseRecoveryAsyncClient(BasicAuthenticationDetailsProvider authenticationDetailsProvider,
ClientConfiguration configuration)
Deprecated.
Use the
builder instead. |
DatabaseRecoveryAsyncClient(BasicAuthenticationDetailsProvider authenticationDetailsProvider,
ClientConfiguration configuration,
ClientConfigurator clientConfigurator)
Deprecated.
Use the
builder instead. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getEndpoint, refreshClient, setEndpoint, useRealmSpecificEndpointTemplate
close
public static final Service SERVICE
Service instance for DatabaseRecovery.
public final String clientCommonLibraryVersion
@Deprecated public DatabaseRecoveryAsyncClient(BasicAuthenticationDetailsProvider authenticationDetailsProvider)
builder
instead.Create a new client instance.
authenticationDetailsProvider
- The authentication details (see DatabaseRecoveryAsyncClient.Builder.build(com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider)
)@Deprecated public DatabaseRecoveryAsyncClient(BasicAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration)
builder
instead.Create a new client instance.
authenticationDetailsProvider
- The authentication details (see DatabaseRecoveryAsyncClient.Builder.build(com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider)
)configuration
- ClientBuilderBase.configuration
@Deprecated public DatabaseRecoveryAsyncClient(BasicAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration, ClientConfigurator clientConfigurator)
builder
instead.Create a new client instance.
authenticationDetailsProvider
- The authentication details (see DatabaseRecoveryAsyncClient.Builder.build(com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider)
)configuration
- ClientBuilderBase.configuration
clientConfigurator
- ClientBuilderBase.clientConfigurator(com.oracle.bmc.http.ClientConfigurator)
@Deprecated public DatabaseRecoveryAsyncClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration, ClientConfigurator clientConfigurator, RequestSignerFactory defaultRequestSignerFactory)
builder
instead.Create a new client instance.
authenticationDetailsProvider
- The authentication details (see DatabaseRecoveryAsyncClient.Builder.build(com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider)
)configuration
- ClientBuilderBase.configuration
clientConfigurator
- ClientBuilderBase.clientConfigurator(com.oracle.bmc.http.ClientConfigurator)
defaultRequestSignerFactory
- ClientBuilderBase.requestSignerFactory
@Deprecated public DatabaseRecoveryAsyncClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration, ClientConfigurator clientConfigurator, RequestSignerFactory defaultRequestSignerFactory, List<ClientConfigurator> additionalClientConfigurators)
builder
instead.Create a new client instance.
authenticationDetailsProvider
- The authentication details (see DatabaseRecoveryAsyncClient.Builder.build(com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider)
)configuration
- ClientBuilderBase.configuration
clientConfigurator
- ClientBuilderBase.clientConfigurator(com.oracle.bmc.http.ClientConfigurator)
defaultRequestSignerFactory
- ClientBuilderBase.requestSignerFactory
additionalClientConfigurators
- ClientBuilderBase.additionalClientConfigurators
@Deprecated public DatabaseRecoveryAsyncClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration, ClientConfigurator clientConfigurator, RequestSignerFactory defaultRequestSignerFactory, List<ClientConfigurator> additionalClientConfigurators, String endpoint)
builder
instead.Create a new client instance.
authenticationDetailsProvider
- The authentication details (see DatabaseRecoveryAsyncClient.Builder.build(com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider)
)configuration
- ClientBuilderBase.configuration
clientConfigurator
- ClientBuilderBase.clientConfigurator(com.oracle.bmc.http.ClientConfigurator)
defaultRequestSignerFactory
- ClientBuilderBase.requestSignerFactory
additionalClientConfigurators
- ClientBuilderBase.additionalClientConfigurators
endpoint
- ClientBuilderBase.endpoint(java.lang.String)
@Deprecated public DatabaseRecoveryAsyncClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration, ClientConfigurator clientConfigurator, RequestSignerFactory defaultRequestSignerFactory, Map<SigningStrategy,RequestSignerFactory> signingStrategyRequestSignerFactories, List<ClientConfigurator> additionalClientConfigurators, String endpoint)
builder
instead.Create a new client instance.
authenticationDetailsProvider
- The authentication details (see DatabaseRecoveryAsyncClient.Builder.build(com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider)
)configuration
- ClientBuilderBase.configuration
clientConfigurator
- ClientBuilderBase.clientConfigurator(com.oracle.bmc.http.ClientConfigurator)
defaultRequestSignerFactory
- ClientBuilderBase.requestSignerFactory
additionalClientConfigurators
- ClientBuilderBase.additionalClientConfigurators
endpoint
- ClientBuilderBase.endpoint(java.lang.String)
signingStrategyRequestSignerFactories
- ClientBuilderBase.signingStrategyRequestSignerFactories
public static DatabaseRecoveryAsyncClient.Builder builder()
Create a builder for this client.
public void setRegion(Region region)
DatabaseRecoveryAsync
Sets the region to call (ex, Region.US_PHOENIX_1).
Note, this will call setEndpoint
after resolving the
endpoint. If the service is not available in this region, however, an
IllegalArgumentException will be raised.
setRegion
in interface DatabaseRecoveryAsync
region
- The region of the service.public void setRegion(String regionId)
DatabaseRecoveryAsync
Sets the region to call (ex, ‘us-phoenix-1’).
Note, this will first try to map the region ID to a known Region and call setRegion
.
If no known Region could be determined, it will create an endpoint based on the default
endpoint format (Region.formatDefaultRegionEndpoint(Service, String)
and then call setEndpoint
.
setRegion
in interface DatabaseRecoveryAsync
regionId
- The public region ID.public Future<CancelProtectedDatabaseDeletionResponse> cancelProtectedDatabaseDeletion(CancelProtectedDatabaseDeletionRequest request, AsyncHandler<CancelProtectedDatabaseDeletionRequest,CancelProtectedDatabaseDeletionResponse> handler)
DatabaseRecoveryAsync
Cancels the scheduled deletion of a protected database, and returns the protected database to an ACTIVE state. You can cancel the deletion only if the protected database is in the DELETE SCHEDULED state.
cancelProtectedDatabaseDeletion
in interface DatabaseRecoveryAsync
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.public Future<ChangeProtectedDatabaseCompartmentResponse> changeProtectedDatabaseCompartment(ChangeProtectedDatabaseCompartmentRequest request, AsyncHandler<ChangeProtectedDatabaseCompartmentRequest,ChangeProtectedDatabaseCompartmentResponse> handler)
DatabaseRecoveryAsync
Moves a protected database resource from the existing compartment to the specified compartment. When provided, If-Match is checked against ETag values of the resource.
changeProtectedDatabaseCompartment
in interface DatabaseRecoveryAsync
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.public Future<ChangeProtectedDatabaseSubscriptionResponse> changeProtectedDatabaseSubscription(ChangeProtectedDatabaseSubscriptionRequest request, AsyncHandler<ChangeProtectedDatabaseSubscriptionRequest,ChangeProtectedDatabaseSubscriptionResponse> handler)
DatabaseRecoveryAsync
Associates the protected database with a new cloud service environment, such as Microsoft Azure.
changeProtectedDatabaseSubscription
in interface DatabaseRecoveryAsync
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.public Future<ChangeProtectionPolicyCompartmentResponse> changeProtectionPolicyCompartment(ChangeProtectionPolicyCompartmentRequest request, AsyncHandler<ChangeProtectionPolicyCompartmentRequest,ChangeProtectionPolicyCompartmentResponse> handler)
DatabaseRecoveryAsync
Moves a protection policy resource from the existing compartment to the specified compartment. When provided, If-Match is checked against ETag values of the resource.
changeProtectionPolicyCompartment
in interface DatabaseRecoveryAsync
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.public Future<ChangeRecoveryServiceSubnetCompartmentResponse> changeRecoveryServiceSubnetCompartment(ChangeRecoveryServiceSubnetCompartmentRequest request, AsyncHandler<ChangeRecoveryServiceSubnetCompartmentRequest,ChangeRecoveryServiceSubnetCompartmentResponse> handler)
DatabaseRecoveryAsync
Moves a recovery service subnet resource from the existing compartment to the specified compartment. When provided, If-Match is checked against ETag values of the resource.
changeRecoveryServiceSubnetCompartment
in interface DatabaseRecoveryAsync
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.public Future<CreateProtectedDatabaseResponse> createProtectedDatabase(CreateProtectedDatabaseRequest request, AsyncHandler<CreateProtectedDatabaseRequest,CreateProtectedDatabaseResponse> handler)
DatabaseRecoveryAsync
Creates a new Protected Database.
createProtectedDatabase
in interface DatabaseRecoveryAsync
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.public Future<CreateProtectionPolicyResponse> createProtectionPolicy(CreateProtectionPolicyRequest request, AsyncHandler<CreateProtectionPolicyRequest,CreateProtectionPolicyResponse> handler)
DatabaseRecoveryAsync
Creates a new Protection Policy.
createProtectionPolicy
in interface DatabaseRecoveryAsync
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.public Future<CreateRecoveryServiceSubnetResponse> createRecoveryServiceSubnet(CreateRecoveryServiceSubnetRequest request, AsyncHandler<CreateRecoveryServiceSubnetRequest,CreateRecoveryServiceSubnetResponse> handler)
DatabaseRecoveryAsync
Creates a new Recovery Service Subnet.
createRecoveryServiceSubnet
in interface DatabaseRecoveryAsync
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.public Future<DeleteProtectedDatabaseResponse> deleteProtectedDatabase(DeleteProtectedDatabaseRequest request, AsyncHandler<DeleteProtectedDatabaseRequest,DeleteProtectedDatabaseResponse> handler)
DatabaseRecoveryAsync
Deletes a protected database based on the specified protected database ID.
deleteProtectedDatabase
in interface DatabaseRecoveryAsync
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.public Future<DeleteProtectionPolicyResponse> deleteProtectionPolicy(DeleteProtectionPolicyRequest request, AsyncHandler<DeleteProtectionPolicyRequest,DeleteProtectionPolicyResponse> handler)
DatabaseRecoveryAsync
Deletes a specified protection policy. You can delete custom policies only. Deleting a Oracle predefined policies will result in status code 405 Method Not Allowed.
deleteProtectionPolicy
in interface DatabaseRecoveryAsync
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.public Future<DeleteRecoveryServiceSubnetResponse> deleteRecoveryServiceSubnet(DeleteRecoveryServiceSubnetRequest request, AsyncHandler<DeleteRecoveryServiceSubnetRequest,DeleteRecoveryServiceSubnetResponse> handler)
DatabaseRecoveryAsync
Deletes a specified recovery service subnet.
deleteRecoveryServiceSubnet
in interface DatabaseRecoveryAsync
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.public Future<FetchProtectedDatabaseConfigurationResponse> fetchProtectedDatabaseConfiguration(FetchProtectedDatabaseConfigurationRequest request, AsyncHandler<FetchProtectedDatabaseConfigurationRequest,FetchProtectedDatabaseConfigurationResponse> handler)
DatabaseRecoveryAsync
Downloads the network service configuration file ‘tnsnames.ora’ for a specified protected database. Applies to user-defined recovery systems only.
fetchProtectedDatabaseConfiguration
in interface DatabaseRecoveryAsync
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.public Future<GetProtectedDatabaseResponse> getProtectedDatabase(GetProtectedDatabaseRequest request, AsyncHandler<GetProtectedDatabaseRequest,GetProtectedDatabaseResponse> handler)
DatabaseRecoveryAsync
Gets information about a specified protected database.
getProtectedDatabase
in interface DatabaseRecoveryAsync
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.public Future<GetProtectionPolicyResponse> getProtectionPolicy(GetProtectionPolicyRequest request, AsyncHandler<GetProtectionPolicyRequest,GetProtectionPolicyResponse> handler)
DatabaseRecoveryAsync
Gets information about a specified protection policy.
getProtectionPolicy
in interface DatabaseRecoveryAsync
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.public Future<GetRecoveryServiceSubnetResponse> getRecoveryServiceSubnet(GetRecoveryServiceSubnetRequest request, AsyncHandler<GetRecoveryServiceSubnetRequest,GetRecoveryServiceSubnetResponse> handler)
DatabaseRecoveryAsync
Gets information about a specified recovery service subnet.
getRecoveryServiceSubnet
in interface DatabaseRecoveryAsync
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.public Future<GetWorkRequestResponse> getWorkRequest(GetWorkRequestRequest request, AsyncHandler<GetWorkRequestRequest,GetWorkRequestResponse> handler)
DatabaseRecoveryAsync
Gets the status of the work request based on the specified ID
getWorkRequest
in interface DatabaseRecoveryAsync
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.public Future<ListProtectedDatabasesResponse> listProtectedDatabases(ListProtectedDatabasesRequest request, AsyncHandler<ListProtectedDatabasesRequest,ListProtectedDatabasesResponse> handler)
DatabaseRecoveryAsync
Lists the protected databases based on the specified parameters.
listProtectedDatabases
in interface DatabaseRecoveryAsync
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.public Future<ListProtectionPoliciesResponse> listProtectionPolicies(ListProtectionPoliciesRequest request, AsyncHandler<ListProtectionPoliciesRequest,ListProtectionPoliciesResponse> handler)
DatabaseRecoveryAsync
Gets a list of protection policies based on the specified parameters.
listProtectionPolicies
in interface DatabaseRecoveryAsync
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.public Future<ListRecoveryServiceSubnetsResponse> listRecoveryServiceSubnets(ListRecoveryServiceSubnetsRequest request, AsyncHandler<ListRecoveryServiceSubnetsRequest,ListRecoveryServiceSubnetsResponse> handler)
DatabaseRecoveryAsync
Returns a list of Recovery Service Subnets.
listRecoveryServiceSubnets
in interface DatabaseRecoveryAsync
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.public Future<ListWorkRequestErrorsResponse> listWorkRequestErrors(ListWorkRequestErrorsRequest request, AsyncHandler<ListWorkRequestErrorsRequest,ListWorkRequestErrorsResponse> handler)
DatabaseRecoveryAsync
Return a (paginated) list of errors for a given work request.
listWorkRequestErrors
in interface DatabaseRecoveryAsync
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.public Future<ListWorkRequestLogsResponse> listWorkRequestLogs(ListWorkRequestLogsRequest request, AsyncHandler<ListWorkRequestLogsRequest,ListWorkRequestLogsResponse> handler)
DatabaseRecoveryAsync
Return a (paginated) list of logs for a given work request.
listWorkRequestLogs
in interface DatabaseRecoveryAsync
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.public Future<ListWorkRequestsResponse> listWorkRequests(ListWorkRequestsRequest request, AsyncHandler<ListWorkRequestsRequest,ListWorkRequestsResponse> handler)
DatabaseRecoveryAsync
Lists the work requests in a compartment.
listWorkRequests
in interface DatabaseRecoveryAsync
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.public Future<ScheduleProtectedDatabaseDeletionResponse> scheduleProtectedDatabaseDeletion(ScheduleProtectedDatabaseDeletionRequest request, AsyncHandler<ScheduleProtectedDatabaseDeletionRequest,ScheduleProtectedDatabaseDeletionResponse> handler)
DatabaseRecoveryAsync
Defines a preferred schedule to delete a protected database after you terminate the source database. The default schedule is DELETE_AFTER_72_HOURS, so that the delete operation can occur 72 hours (3 days) after the source database is terminated. The alternate schedule is DELETE_AFTER_RETENTION_PERIOD. Specify this option if you want to delete a protected database only after the policy-defined backup retention period expires.
scheduleProtectedDatabaseDeletion
in interface DatabaseRecoveryAsync
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.public Future<UpdateProtectedDatabaseResponse> updateProtectedDatabase(UpdateProtectedDatabaseRequest request, AsyncHandler<UpdateProtectedDatabaseRequest,UpdateProtectedDatabaseResponse> handler)
DatabaseRecoveryAsync
Updates the Protected Database
updateProtectedDatabase
in interface DatabaseRecoveryAsync
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.public Future<UpdateProtectionPolicyResponse> updateProtectionPolicy(UpdateProtectionPolicyRequest request, AsyncHandler<UpdateProtectionPolicyRequest,UpdateProtectionPolicyResponse> handler)
DatabaseRecoveryAsync
Updates the specified protection policy.
updateProtectionPolicy
in interface DatabaseRecoveryAsync
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.public Future<UpdateRecoveryServiceSubnetResponse> updateRecoveryServiceSubnet(UpdateRecoveryServiceSubnetRequest request, AsyncHandler<UpdateRecoveryServiceSubnetRequest,UpdateRecoveryServiceSubnetResponse> handler)
DatabaseRecoveryAsync
Updates the specified recovery service subnet.
updateRecoveryServiceSubnet
in interface DatabaseRecoveryAsync
request
- The request object containing the details to sendhandler
- The request handler to invoke upon completion, may be null.protected ClientConfigurator getDefaultConfigurator()
public void useRealmSpecificEndpointTemplate(boolean useOfRealmSpecificEndpointTemplateEnabled)
useOfRealmSpecificEndpointTemplateEnabled
- This flag can be set to true or false to
enable or disable the use of realm-specific endpoint template respectivelypublic final void populateServiceParametersInEndpoint(String endpoint, Map<String,Object> requiredParametersMap)
endpoint
- The endpoint template in userequiredParametersMap
- Map of parameter name as key and value set in request path or
query parameter as valuepublic final void updateBaseEndpoint(String endpoint)
endpoint
- The updated endpoint to usepublic final void setEndpoint(String endpoint)
public final String getEndpoint()
public final void refreshClient()
HttpClient
. This will call ClientConfigurator
s again, and
can be used to e.g. refresh the SSL certificate.public final void close()
close
in interface AutoCloseable
public String getClientCommonLibraryVersion()
public Optional<String> getMinimumClientCommonLibraryVersionFromClient()
protected <REQ extends BmcRequest<?>,RESP extends BmcResponse,RESP_BUILDER extends BmcResponse.Builder<RESP>> ClientCall<REQ,RESP,RESP_BUILDER> clientCall(REQ request, Supplier<RESP_BUILDER> responseBuilder)
Copyright © 2016–2024. All rights reserved.