Package io.stargate.sdk.doc
Class StargateDocumentApiClient
java.lang.Object
io.stargate.sdk.doc.StargateDocumentApiClient
Client for the Astra/Stargate document (collections) API.
- Author:
- Cedrick LUNVEN (@clunven)
-
Field Summary
FieldsModifier and TypeFieldDescriptionMapping from root URL to rest endpoint listing keyspaces definitions.Mapping from root URL to rest endpoint listing keyspaces definitions.static final StringSchema sub level.static final StringSchema sub level.static final StringSchema sub level.protected final LoadBalancedHttpClientGet Topology of the nodes. -
Constructor Summary
ConstructorsConstructorDescriptionDefault ConstructorStargateDocumentApiClient(ServiceDeployment<ServiceHttp> serviceDeployment) Initialized document API with a URL and a token.StargateDocumentApiClient(String endpoint) Single instance of Stargate, could be used for tests. -
Method Summary
Modifier and TypeMethodDescriptionGets stargateHttpClientMove the document API (namespace client)Return list of Namespace (keyspaces) names available.Return list ofNamespace(keyspaces) available.
-
Field Details
-
PATH_SCHEMA_NAMESPACES
Schema sub level.- See Also:
-
PATH_SCHEMA
Schema sub level.- See Also:
-
PATH_V2
Schema sub level.- See Also:
-
stargateHttpClient
Get Topology of the nodes. -
namespacesSchemaResource
Mapping from root URL to rest endpoint listing keyspaces definitions. -
namespacesResource
Mapping from root URL to rest endpoint listing keyspaces definitions.
-
-
Constructor Details
-
StargateDocumentApiClient
public StargateDocumentApiClient()Default Constructor -
StargateDocumentApiClient
Single instance of Stargate, could be used for tests.- Parameters:
endpoint- service endpoint
-
StargateDocumentApiClient
Initialized document API with a URL and a token.- Parameters:
serviceDeployment- http client topology aware
-
-
Method Details
-
namespaces
Return list ofNamespace(keyspaces) available.- Returns:
- Stream
- See Also:
-
namespaceNames
Return list of Namespace (keyspaces) names available.- Returns:
- stream of the namespaces
-
namespace
Move the document API (namespace client)- Parameters:
namespace- String- Returns:
- NamespaceClient
-
getStargateHttpClient
Gets stargateHttpClient- Returns:
- value of stargateHttpClient
-