public class AsyncAnalyticsIndexManager extends Object
Constructor and Description |
---|
AsyncAnalyticsIndexManager(AsyncCluster cluster)
Creates a new
AsyncAnalyticsIndexManager . |
Modifier and Type | Method and Description |
---|---|
CompletableFuture<Void> |
connectLink()
Connects the analytics link for the default dataverse (Default.Local).
|
CompletableFuture<Void> |
connectLink(ConnectLinkAnalyticsOptions options)
Connects the analytics link for the default dataverse with custom options.
|
CompletableFuture<Void> |
createDataset(String datasetName,
String bucketName)
Creates a new dataset (analytics collection) if it does not already exist.
|
CompletableFuture<Void> |
createDataset(String datasetName,
String bucketName,
CreateDatasetAnalyticsOptions options)
Creates a new dataset (analytics collection) if it does not already exist with custom options.
|
CompletableFuture<Void> |
createDataverse(String dataverseName)
Creates a new dataverse (analytics scope) if it does not already exist.
|
CompletableFuture<Void> |
createDataverse(String dataverseName,
CreateDataverseAnalyticsOptions options)
Creates a new dataverse (analytics scope) if it does not already exist with custom options.
|
CompletableFuture<Void> |
createIndex(String indexName,
String datasetName,
Map<String,AnalyticsDataType> fields)
Creates a new analytics index if it does not exist.
|
CompletableFuture<Void> |
createIndex(String indexName,
String datasetName,
Map<String,AnalyticsDataType> fields,
CreateIndexAnalyticsOptions options)
Creates a new analytics index if it does not exist with custom options.
|
CompletableFuture<Void> |
createLink(AnalyticsLink link)
Creates a new analytics link.
|
CompletableFuture<Void> |
createLink(AnalyticsLink link,
CreateLinkAnalyticsOptions options)
Creates a new analytics link with custom options.
|
CompletableFuture<Void> |
disconnectLink()
Disconnects the analytics link for the default dataverse (Default.Local).
|
CompletableFuture<Void> |
disconnectLink(DisconnectLinkAnalyticsOptions options)
Disconnects the analytics link for the default dataverse with custom options.
|
CompletableFuture<Void> |
dropDataset(String datasetName)
Drops (deletes) a dataset.
|
CompletableFuture<Void> |
dropDataset(String datasetName,
DropDatasetAnalyticsOptions options)
Drops (deletes) a dataset with custom options.
|
CompletableFuture<Void> |
dropDataverse(String dataverseName)
Drops (deletes) a dataverse.
|
CompletableFuture<Void> |
dropDataverse(String dataverseName,
DropDataverseAnalyticsOptions options)
Drops (deletes) a dataverse with custom options.
|
CompletableFuture<Void> |
dropIndex(String indexName,
String datasetName)
Drops (removes) an index if it exists.
|
CompletableFuture<Void> |
dropIndex(String indexName,
String datasetName,
DropIndexAnalyticsOptions options)
Drops (removes) an index if it exists with custom options.
|
CompletableFuture<Void> |
dropLink(String linkName,
String dataverse)
Drops (removes) a link if it exists.
|
CompletableFuture<Void> |
dropLink(String linkName,
String dataverse,
DropLinkAnalyticsOptions options)
Drops (removes) a link if it exists with custom options.
|
CompletableFuture<List<AnalyticsDataset>> |
getAllDatasets()
Fetches all datasets (analytics collections) from the analytics service.
|
CompletableFuture<List<AnalyticsDataset>> |
getAllDatasets(GetAllDatasetsAnalyticsOptions options)
Fetches all datasets (analytics collections) from the analytics service with custom options.
|
CompletableFuture<List<AnalyticsDataverse>> |
getAllDataverses()
Fetches all dataverses (analytics scopes) from the analytics service.
|
CompletableFuture<List<AnalyticsDataverse>> |
getAllDataverses(GetAllDataversesAnalyticsOptions options)
Fetches all dataverses (analytics scopes) from the analytics service with custom options.
|
CompletableFuture<List<AnalyticsIndex>> |
getAllIndexes()
Lists all analytics indexes.
|
CompletableFuture<List<AnalyticsIndex>> |
getAllIndexes(GetAllIndexesAnalyticsOptions options)
Lists all analytics indexes with custom options.
|
CompletableFuture<List<AnalyticsLink>> |
getLinks()
Returns a (potentially empty) list of current analytics links.
|
CompletableFuture<List<AnalyticsLink>> |
getLinks(GetLinksAnalyticsOptions options)
Returns a (potentially empty) list of current analytics links with custom options.
|
CompletableFuture<Map<String,Map<String,Long>>> |
getPendingMutations()
Returns the pending mutations for different dataverses.
|
CompletableFuture<Map<String,Map<String,Long>>> |
getPendingMutations(GetPendingMutationsAnalyticsOptions options)
Returns the pending mutations for different dataverses with custom options.
|
CompletableFuture<Void> |
replaceLink(AnalyticsLink link)
Replaces an existing analytics link.
|
CompletableFuture<Void> |
replaceLink(AnalyticsLink link,
ReplaceLinkAnalyticsOptions options)
Replaces an analytics link with custom options.
|
@Stability.Internal public AsyncAnalyticsIndexManager(AsyncCluster cluster)
AsyncAnalyticsIndexManager
.
This API is not intended to be called by the user directly, use AsyncCluster.analyticsIndexes()
instead.
cluster
- the async cluster to perform the analytics queries on.public CompletableFuture<Void> createDataverse(String dataverseName)
dataverseName
- the name of the dataverse to create.CompletableFuture
completing when the operation is applied or failed with an error.com.couchbase.client.core.error.DataverseExistsException
- (async) if the dataverse already exists.com.couchbase.client.core.error.CouchbaseException
- (async) if any other generic unhandled/unexpected errors.public CompletableFuture<Void> createDataverse(String dataverseName, CreateDataverseAnalyticsOptions options)
dataverseName
- the name of the dataverse to create.options
- the custom options to apply.CompletableFuture
completing when the operation is applied or failed with an error.com.couchbase.client.core.error.DataverseExistsException
- (async) if the dataverse already exists.com.couchbase.client.core.error.CouchbaseException
- (async) if any other generic unhandled/unexpected errors.@Stability.Uncommitted public CompletableFuture<List<AnalyticsDataverse>> getAllDataverses()
CompletableFuture
completing with a (potentially empty) list of dataverses or failed with an error.com.couchbase.client.core.error.CouchbaseException
- (async) if any other generic unhandled/unexpected errors.@Stability.Uncommitted public CompletableFuture<List<AnalyticsDataverse>> getAllDataverses(GetAllDataversesAnalyticsOptions options)
options
- the custom options to apply.CompletableFuture
completing with a (potentially empty) list of dataverses or failed with an error.com.couchbase.client.core.error.CouchbaseException
- (async) if any other generic unhandled/unexpected errors.public CompletableFuture<Void> dropDataverse(String dataverseName)
dataverseName
- the name of the dataverse to drop.CompletableFuture
completing when the operation is applied or failed with an error.com.couchbase.client.core.error.DataverseNotFoundException
- (async) if the dataverse does not exist.com.couchbase.client.core.error.CompilationFailureException
- (async) if a dataverse that cannot be dropped (i.e. Default) is attempted.com.couchbase.client.core.error.CouchbaseException
- (async) if any other generic unhandled/unexpected errors.public CompletableFuture<Void> dropDataverse(String dataverseName, DropDataverseAnalyticsOptions options)
dataverseName
- the name of the dataverse to drop.options
- the custom options to apply.CompletableFuture
completing when the operation is applied or failed with an error.com.couchbase.client.core.error.DataverseNotFoundException
- (async) if the dataverse does not exist.com.couchbase.client.core.error.CompilationFailureException
- (async) if a dataverse that cannot be dropped (i.e. Default) is attempted.com.couchbase.client.core.error.CouchbaseException
- (async) if any other generic unhandled/unexpected errors.public CompletableFuture<Void> createDataset(String datasetName, String bucketName)
datasetName
- the name of the dataset to create.bucketName
- the name of the bucket where the dataset is stored inside.CompletableFuture
completing when the operation is applied or failed with an error.com.couchbase.client.core.error.DatasetExistsException
- (async) if the dataset already exists.com.couchbase.client.core.error.CouchbaseException
- (async) if any other generic unhandled/unexpected errors.public CompletableFuture<Void> createDataset(String datasetName, String bucketName, CreateDatasetAnalyticsOptions options)
datasetName
- the name of the dataset to create.bucketName
- the name of the bucket where the dataset is stored inside.options
- the custom options to apply.CompletableFuture
completing when the operation is applied or failed with an error.com.couchbase.client.core.error.DatasetExistsException
- (async) if the dataset already exists.com.couchbase.client.core.error.CouchbaseException
- (async) if any other generic unhandled/unexpected errors.public CompletableFuture<Void> dropDataset(String datasetName)
datasetName
- the name of the dataset to create.CompletableFuture
completing when the operation is applied or failed with an error.com.couchbase.client.core.error.DatasetNotFoundException
- (async) if the dataset to drop does not exist.com.couchbase.client.core.error.CouchbaseException
- (async) if any other generic unhandled/unexpected errors.public CompletableFuture<Void> dropDataset(String datasetName, DropDatasetAnalyticsOptions options)
datasetName
- the name of the dataset to create.options
- the custom options to apply.CompletableFuture
completing when the operation is applied or failed with an error.com.couchbase.client.core.error.DatasetNotFoundException
- (async) if the dataset to drop does not exist.com.couchbase.client.core.error.CouchbaseException
- (async) if any other generic unhandled/unexpected errors.public CompletableFuture<List<AnalyticsDataset>> getAllDatasets()
CompletableFuture
completing with a (potentially empty) list of datasets or failed with an error.com.couchbase.client.core.error.CouchbaseException
- (async) if any other generic unhandled/unexpected errors.public CompletableFuture<List<AnalyticsDataset>> getAllDatasets(GetAllDatasetsAnalyticsOptions options)
options
- the custom options to apply.CompletableFuture
completing with a (potentially empty) list of datasets or failed with an error.com.couchbase.client.core.error.CouchbaseException
- (async) if any other generic unhandled/unexpected errors.public CompletableFuture<Void> createIndex(String indexName, String datasetName, Map<String,AnalyticsDataType> fields)
indexName
- the name of the index to create.datasetName
- the name of the dataset in which the index should be created.fields
- the fields that should be indexed.CompletableFuture
completing when the operation is applied or failed with an error.com.couchbase.client.core.error.IndexExistsException
- (async) if the index already exists and not ignored in the options.com.couchbase.client.core.error.DataverseNotFoundException
- (async) if a dataverse is provided in the options that does not exist.com.couchbase.client.core.error.DatasetNotFoundException
- (async) if a dataset is provided which does not exist.com.couchbase.client.core.error.CouchbaseException
- (async) if any other generic unhandled/unexpected errors.public CompletableFuture<Void> createIndex(String indexName, String datasetName, Map<String,AnalyticsDataType> fields, CreateIndexAnalyticsOptions options)
indexName
- the name of the index to create.datasetName
- the name of the dataset in which the index should be created.fields
- the fields that should be indexed.options
- the custom options to apply.CompletableFuture
completing when the operation is applied or failed with an error.com.couchbase.client.core.error.IndexExistsException
- (async) if the index already exists and not ignored in the options.com.couchbase.client.core.error.DataverseNotFoundException
- (async) if a dataverse is provided in the options that does not exist.com.couchbase.client.core.error.DatasetNotFoundException
- (async) if a dataset is provided which does not exist.com.couchbase.client.core.error.CouchbaseException
- (async) if any other generic unhandled/unexpected errors.public CompletableFuture<List<AnalyticsIndex>> getAllIndexes()
CompletableFuture
completing with a list of indexes or failed with an error.com.couchbase.client.core.error.CouchbaseException
- (async) if any other generic unhandled/unexpected errors.public CompletableFuture<List<AnalyticsIndex>> getAllIndexes(GetAllIndexesAnalyticsOptions options)
options
- the custom options to apply.CompletableFuture
completing with a (potentially empty) list of indexes or failed with an error.com.couchbase.client.core.error.CouchbaseException
- (async) if any other generic unhandled/unexpected errors.public CompletableFuture<Void> dropIndex(String indexName, String datasetName)
indexName
- the name of the index to drop.datasetName
- the dataset in which the index exists.CompletableFuture
completing when the operation is applied or failed with an error.com.couchbase.client.core.error.IndexNotFoundException
- (async) if the index does not exist and not ignored via options.com.couchbase.client.core.error.DataverseNotFoundException
- (async) if a dataverse is provided in the options that does not exist.com.couchbase.client.core.error.DatasetNotFoundException
- (async) if a dataset is provided which does not exist.com.couchbase.client.core.error.CouchbaseException
- (async) if any other generic unhandled/unexpected errors.public CompletableFuture<Void> dropIndex(String indexName, String datasetName, DropIndexAnalyticsOptions options)
indexName
- the name of the index to drop.datasetName
- the dataset in which the index exists.options
- the custom options to apply.CompletableFuture
completing when the operation is applied or failed with an error.com.couchbase.client.core.error.IndexNotFoundException
- (async) if the index does not exist and not ignored via options.com.couchbase.client.core.error.DataverseNotFoundException
- (async) if a dataverse is provided in the options that does not exist.com.couchbase.client.core.error.DatasetNotFoundException
- (async) if a dataset is provided which does not exist.com.couchbase.client.core.error.CouchbaseException
- (async) if any other generic unhandled/unexpected errors.public CompletableFuture<Map<String,Map<String,Long>>> getPendingMutations()
CompletableFuture
completing with the pending mutations or failed with an error.com.couchbase.client.core.error.CouchbaseException
- (async) if any other generic unhandled/unexpected errors.public CompletableFuture<Map<String,Map<String,Long>>> getPendingMutations(GetPendingMutationsAnalyticsOptions options)
options
- the custom options to apply.CompletableFuture
completing with the pending mutations or failed with an error.com.couchbase.client.core.error.CouchbaseException
- (async) if any other generic unhandled/unexpected errors.public CompletableFuture<Void> connectLink()
CompletableFuture
completing when the operation is applied or failed with an error.com.couchbase.client.core.error.CouchbaseException
- (async) if any other generic unhandled/unexpected errors.public CompletableFuture<Void> connectLink(ConnectLinkAnalyticsOptions options)
options
- the custom options to apply.CompletableFuture
completing when the operation is applied or failed with an error.com.couchbase.client.core.error.LinkNotFoundException
- (async) if the link does not exist.com.couchbase.client.core.error.DataverseNotFoundException
- (async) if a dataverse is provided in the options that does not exist.com.couchbase.client.core.error.CouchbaseException
- (async) if any other generic unhandled/unexpected errors.public CompletableFuture<Void> disconnectLink()
CompletableFuture
completing when the operation is applied or failed with an error.com.couchbase.client.core.error.CouchbaseException
- (async) if any other generic unhandled/unexpected errors.public CompletableFuture<Void> disconnectLink(DisconnectLinkAnalyticsOptions options)
options
- the custom options to apply.CompletableFuture
completing when the operation is applied or failed with an error.com.couchbase.client.core.error.LinkNotFoundException
- (async) if the link does not exist.com.couchbase.client.core.error.DataverseNotFoundException
- (async) if a dataverse is provided in the options that does not exist.com.couchbase.client.core.error.CouchbaseException
- (async) if any other generic unhandled/unexpected errors.public CompletableFuture<Void> createLink(AnalyticsLink link)
link
- the name of the link that should be created.CompletableFuture
completing when the operation is applied or failed with an error.com.couchbase.client.core.error.InvalidArgumentException
- (async) if required parameters are not supplied or are invalid.com.couchbase.client.core.error.AuthenticationFailureException
- (async) if the remote link cannot be authenticated on creation.com.couchbase.client.core.error.LinkExistsException
- (async) if the link with the name already exists.com.couchbase.client.core.error.CouchbaseException
- (async) if any other generic unhandled/unexpected errors.public CompletableFuture<Void> createLink(AnalyticsLink link, CreateLinkAnalyticsOptions options)
link
- the name of the link that should be created.options
- the custom options to apply.CompletableFuture
completing when the operation is applied or failed with an error.com.couchbase.client.core.error.InvalidArgumentException
- (async) if required parameters are not supplied or are invalid.com.couchbase.client.core.error.AuthenticationFailureException
- (async) if the remote link cannot be authenticated on creation.com.couchbase.client.core.error.LinkExistsException
- (async) if the link with the name already exists.com.couchbase.client.core.error.CouchbaseException
- (async) if any other generic unhandled/unexpected errors.public CompletableFuture<Void> replaceLink(AnalyticsLink link)
link
- the name of the link that should be replaced.CompletableFuture
completing when the operation is applied or failed with an error.com.couchbase.client.core.error.InvalidArgumentException
- (async) if required parameters are not supplied or are invalid.com.couchbase.client.core.error.AuthenticationFailureException
- (async) if the remote link cannot be authenticated on replace.com.couchbase.client.core.error.LinkNotFoundException
- (async) if the link does not exist.com.couchbase.client.core.error.CouchbaseException
- (async) if any other generic unhandled/unexpected errors.public CompletableFuture<Void> replaceLink(AnalyticsLink link, ReplaceLinkAnalyticsOptions options)
link
- the name of the link that should be replaced.options
- the custom options to apply.CompletableFuture
completing when the operation is applied or failed with an error.com.couchbase.client.core.error.InvalidArgumentException
- (async) if required parameters are not supplied or are invalid.com.couchbase.client.core.error.AuthenticationFailureException
- (async) if the remote link cannot be authenticated on replace.com.couchbase.client.core.error.LinkNotFoundException
- (async) if the link does not exist.com.couchbase.client.core.error.CouchbaseException
- (async) if any other generic unhandled/unexpected errors.public CompletableFuture<Void> dropLink(String linkName, String dataverse)
linkName
- the name of the link that should be dropped.dataverse
- the name of the dataverse in which the link exists.CompletableFuture
completing when the operation is applied or failed with an error.com.couchbase.client.core.error.LinkNotFoundException
- (async) if the link does not exist.com.couchbase.client.core.error.DataverseNotFoundException
- (async) if a dataverse is provided that does not exist.com.couchbase.client.core.error.CouchbaseException
- (async) if any other generic unhandled/unexpected errors.public CompletableFuture<Void> dropLink(String linkName, String dataverse, DropLinkAnalyticsOptions options)
linkName
- the name of the link that should be dropped.dataverse
- the name of the dataverse in which the link exists.options
- the custom options to apply.CompletableFuture
completing when the operation is applied or failed with an error.com.couchbase.client.core.error.LinkNotFoundException
- (async) if the link does not exist.com.couchbase.client.core.error.DataverseNotFoundException
- (async) if a dataverse is provided that does not exist.com.couchbase.client.core.error.CouchbaseException
- (async) if any other generic unhandled/unexpected errors.public CompletableFuture<List<AnalyticsLink>> getLinks()
Links describe connections between an external data source and the analytics engine. Note that
AnalyticsLink
is an abstract class and has implementations depending on the type of link configured. See
and cast into S3ExternalAnalyticsLink
, or CouchbaseRemoteAnalyticsLink
for specific attributes. In
the future, more external link types might be supported - please consult the server documentation for more
information.
CompletableFuture
completing with a (potentially empty) list of links or failed with an error.com.couchbase.client.core.error.DataverseNotFoundException
- (async) if a dataverse is provided in the options that does not exist.com.couchbase.client.core.error.CouchbaseException
- (async) if any other generic unhandled/unexpected errors.public CompletableFuture<List<AnalyticsLink>> getLinks(GetLinksAnalyticsOptions options)
Links describe connections between an external data source and the analytics engine. Note that
AnalyticsLink
is an abstract class and has implementations depending on the type of link configured. See
and cast into S3ExternalAnalyticsLink
, or CouchbaseRemoteAnalyticsLink
for specific attributes. In
the future, more external link types might be supported - please consult the server documentation for more
information.
options
- the custom options to apply.CompletableFuture
completing with a (potentially empty) list of links or failed with an error.com.couchbase.client.core.error.DataverseNotFoundException
- (async) if a dataverse is provided in the options that does not exist.com.couchbase.client.core.error.CouchbaseException
- (async) if any other generic unhandled/unexpected errors.Copyright © 2024 Couchbase, Inc.. All rights reserved.