Package com.dtsx.astra.sdk.db
Class DbKeyspacesClient
java.lang.Object
com.dtsx.astra.sdk.AbstractApiClient
com.dtsx.astra.sdk.db.DbKeyspacesClient
Delegate Operation to work on Keyspaces
-
Field Summary
Fields inherited from class com.dtsx.astra.sdk.AbstractApiClient
environment, token
-
Constructor Summary
ConstructorDescriptionDbKeyspacesClient
(String token, ApiLocator.AstraEnvironment env, String databaseId) As immutable object use builder to initiate the object.DbKeyspacesClient
(String token, String databaseId) As immutable object use builder to initiate the object. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Create a new keyspace in a DB.void
Delete a keyspace from db.boolean
Evaluate if a keyspace exists.findAll()
Find all keyspace in current DB.getEndpointKeyspace
(String keyspaceName) Endpoint to access keyspace.Methods inherited from class com.dtsx.astra.sdk.AbstractApiClient
assertHttpCodeAccepted, DELETE, GET, getHttpClient, getToken, HEAD, PATCH, POST, POST, PUT
-
Constructor Details
-
DbKeyspacesClient
As immutable object use builder to initiate the object.- Parameters:
token
- authenticated token
-
DbKeyspacesClient
As immutable object use builder to initiate the object.- Parameters:
env
- define target environment to be usedtoken
- authenticated token
-
-
Method Details
-
findAll
Find all keyspace in current DB.- Returns:
- all keyspace names
-
exist
Evaluate if a keyspace exists.- Parameters:
keyspace
- keyspace identifier- Returns:
- if keyspace exists
-
create
Create a new keyspace in a DB.- Parameters:
keyspace
- keyspace name to create
-
delete
Delete a keyspace from db.- Parameters:
keyspace
- current keyspace
-
getEndpointKeyspace
Endpoint to access keyspace. (static).- Parameters:
keyspaceName
- name of keyspace- Returns:
- endpoint
-