Class AsyncAnalyticsIndexManager
-
Constructor Summary
ConstructorDescriptionAsyncAnalyticsIndexManager
(AsyncCluster cluster) Creates a newAsyncAnalyticsIndexManager
. -
Method Summary
Modifier and TypeMethodDescriptionConnects the analytics link for the default dataverse (Default.Local).connectLink
(ConnectLinkAnalyticsOptions options) Connects the analytics link for the default dataverse with custom options.createDataset
(String datasetName, String bucketName) Creates a new dataset (analytics collection) if it does not already exist.createDataset
(String datasetName, String bucketName, CreateDatasetAnalyticsOptions options) Creates a new dataset (analytics collection) if it does not already exist with custom options.createDataverse
(String dataverseName) Creates a new dataverse (analytics scope) if it does not already exist.createDataverse
(String dataverseName, CreateDataverseAnalyticsOptions options) Creates a new dataverse (analytics scope) if it does not already exist with custom options.createIndex
(String indexName, String datasetName, Map<String, AnalyticsDataType> fields) Creates a new analytics index if it does not exist.createIndex
(String indexName, String datasetName, Map<String, AnalyticsDataType> fields, CreateIndexAnalyticsOptions options) Creates a new analytics index if it does not exist with custom options.createLink
(AnalyticsLink link) Creates a new analytics link.createLink
(AnalyticsLink link, CreateLinkAnalyticsOptions options) Creates a new analytics link with custom options.Disconnects the analytics link for the default dataverse (Default.Local).Disconnects the analytics link for the default dataverse with custom options.dropDataset
(String datasetName) Drops (deletes) a dataset.dropDataset
(String datasetName, DropDatasetAnalyticsOptions options) Drops (deletes) a dataset with custom options.dropDataverse
(String dataverseName) Drops (deletes) a dataverse.dropDataverse
(String dataverseName, DropDataverseAnalyticsOptions options) Drops (deletes) a dataverse with custom options.Drops (removes) an index if it exists.dropIndex
(String indexName, String datasetName, DropIndexAnalyticsOptions options) Drops (removes) an index if it exists with custom options.Drops (removes) a link if it exists.dropLink
(String linkName, String dataverse, DropLinkAnalyticsOptions options) Drops (removes) a link if it exists with custom options.Fetches all datasets (analytics collections) from the analytics service.Fetches all datasets (analytics collections) from the analytics service with custom options.Fetches all dataverses (analytics scopes) from the analytics service.Fetches all dataverses (analytics scopes) from the analytics service with custom options.Lists all analytics indexes.Lists all analytics indexes with custom options.getLinks()
Returns a (potentially empty) list of current analytics links.getLinks
(GetLinksAnalyticsOptions options) Returns a (potentially empty) list of current analytics links with custom options.Returns the pending mutations for different dataverses.Returns the pending mutations for different dataverses with custom options.replaceLink
(AnalyticsLink link) Replaces an existing analytics link.replaceLink
(AnalyticsLink link, ReplaceLinkAnalyticsOptions options) Replaces an analytics link with custom options.
-
Constructor Details
-
AsyncAnalyticsIndexManager
Creates a newAsyncAnalyticsIndexManager
.This API is not intended to be called by the user directly, use
AsyncCluster.analyticsIndexes()
instead.- Parameters:
cluster
- the async cluster to perform the analytics queries on.
-
-
Method Details
-
createDataverse
Creates a new dataverse (analytics scope) if it does not already exist.- Parameters:
dataverseName
- the name of the dataverse to create.- Returns:
- a
CompletableFuture
completing when the operation is applied or failed with an error. - Throws:
DataverseExistsException
- (async) if the dataverse already exists.CouchbaseException
- (async) if any other generic unhandled/unexpected errors.
-
createDataverse
public CompletableFuture<Void> createDataverse(String dataverseName, CreateDataverseAnalyticsOptions options) Creates a new dataverse (analytics scope) if it does not already exist with custom options.- Parameters:
dataverseName
- the name of the dataverse to create.options
- the custom options to apply.- Returns:
- a
CompletableFuture
completing when the operation is applied or failed with an error. - Throws:
DataverseExistsException
- (async) if the dataverse already exists.CouchbaseException
- (async) if any other generic unhandled/unexpected errors.
-
getAllDataverses
Fetches all dataverses (analytics scopes) from the analytics service.- Returns:
- a
CompletableFuture
completing with a (potentially empty) list of dataverses or failed with an error. - Throws:
CouchbaseException
- (async) if any other generic unhandled/unexpected errors.
-
getAllDataverses
@Uncommitted public CompletableFuture<List<AnalyticsDataverse>> getAllDataverses(GetAllDataversesAnalyticsOptions options) Fetches all dataverses (analytics scopes) from the analytics service with custom options.- Parameters:
options
- the custom options to apply.- Returns:
- a
CompletableFuture
completing with a (potentially empty) list of dataverses or failed with an error. - Throws:
CouchbaseException
- (async) if any other generic unhandled/unexpected errors.
-
dropDataverse
Drops (deletes) a dataverse.- Parameters:
dataverseName
- the name of the dataverse to drop.- Returns:
- a
CompletableFuture
completing when the operation is applied or failed with an error. - Throws:
DataverseNotFoundException
- (async) if the dataverse does not exist.CompilationFailureException
- (async) if a dataverse that cannot be dropped (i.e. Default) is attempted.CouchbaseException
- (async) if any other generic unhandled/unexpected errors.
-
dropDataverse
public CompletableFuture<Void> dropDataverse(String dataverseName, DropDataverseAnalyticsOptions options) Drops (deletes) a dataverse with custom options.- Parameters:
dataverseName
- the name of the dataverse to drop.options
- the custom options to apply.- Returns:
- a
CompletableFuture
completing when the operation is applied or failed with an error. - Throws:
DataverseNotFoundException
- (async) if the dataverse does not exist.CompilationFailureException
- (async) if a dataverse that cannot be dropped (i.e. Default) is attempted.CouchbaseException
- (async) if any other generic unhandled/unexpected errors.
-
createDataset
Creates a new dataset (analytics collection) if it does not already exist.- Parameters:
datasetName
- the name of the dataset to create.bucketName
- the name of the bucket where the dataset is stored inside.- Returns:
- a
CompletableFuture
completing when the operation is applied or failed with an error. - Throws:
DatasetExistsException
- (async) if the dataset already exists.CouchbaseException
- (async) if any other generic unhandled/unexpected errors.
-
createDataset
public CompletableFuture<Void> createDataset(String datasetName, String bucketName, CreateDatasetAnalyticsOptions options) Creates a new dataset (analytics collection) if it does not already exist with custom options.- Parameters:
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.- Returns:
- a
CompletableFuture
completing when the operation is applied or failed with an error. - Throws:
DatasetExistsException
- (async) if the dataset already exists.CouchbaseException
- (async) if any other generic unhandled/unexpected errors.
-
dropDataset
Drops (deletes) a dataset.- Parameters:
datasetName
- the name of the dataset to create.- Returns:
- a
CompletableFuture
completing when the operation is applied or failed with an error. - Throws:
DatasetNotFoundException
- (async) if the dataset to drop does not exist.CouchbaseException
- (async) if any other generic unhandled/unexpected errors.
-
dropDataset
Drops (deletes) a dataset with custom options.- Parameters:
datasetName
- the name of the dataset to create.options
- the custom options to apply.- Returns:
- a
CompletableFuture
completing when the operation is applied or failed with an error. - Throws:
DatasetNotFoundException
- (async) if the dataset to drop does not exist.CouchbaseException
- (async) if any other generic unhandled/unexpected errors.
-
getAllDatasets
Fetches all datasets (analytics collections) from the analytics service.- Returns:
- a
CompletableFuture
completing with a (potentially empty) list of datasets or failed with an error. - Throws:
CouchbaseException
- (async) if any other generic unhandled/unexpected errors.
-
getAllDatasets
public CompletableFuture<List<AnalyticsDataset>> getAllDatasets(GetAllDatasetsAnalyticsOptions options) Fetches all datasets (analytics collections) from the analytics service with custom options.- Parameters:
options
- the custom options to apply.- Returns:
- a
CompletableFuture
completing with a (potentially empty) list of datasets or failed with an error. - Throws:
CouchbaseException
- (async) if any other generic unhandled/unexpected errors.
-
createIndex
public CompletableFuture<Void> createIndex(String indexName, String datasetName, Map<String, AnalyticsDataType> fields) Creates a new analytics index if it does not exist.- Parameters:
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.- Returns:
- a
CompletableFuture
completing when the operation is applied or failed with an error. - Throws:
IndexExistsException
- (async) if the index already exists and not ignored in the options.DataverseNotFoundException
- (async) if a dataverse is provided in the options that does not exist.DatasetNotFoundException
- (async) if a dataset is provided which does not exist.CouchbaseException
- (async) if any other generic unhandled/unexpected errors.
-
createIndex
public 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.- Parameters:
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.- Returns:
- a
CompletableFuture
completing when the operation is applied or failed with an error. - Throws:
IndexExistsException
- (async) if the index already exists and not ignored in the options.DataverseNotFoundException
- (async) if a dataverse is provided in the options that does not exist.DatasetNotFoundException
- (async) if a dataset is provided which does not exist.CouchbaseException
- (async) if any other generic unhandled/unexpected errors.
-
getAllIndexes
Lists all analytics indexes.- Returns:
- a
CompletableFuture
completing with a list of indexes or failed with an error. - Throws:
CouchbaseException
- (async) if any other generic unhandled/unexpected errors.
-
getAllIndexes
Lists all analytics indexes with custom options.- Parameters:
options
- the custom options to apply.- Returns:
- a
CompletableFuture
completing with a (potentially empty) list of indexes or failed with an error. - Throws:
CouchbaseException
- (async) if any other generic unhandled/unexpected errors.
-
dropIndex
Drops (removes) an index if it exists.- Parameters:
indexName
- the name of the index to drop.datasetName
- the dataset in which the index exists.- Returns:
- a
CompletableFuture
completing when the operation is applied or failed with an error. - Throws:
IndexNotFoundException
- (async) if the index does not exist and not ignored via options.DataverseNotFoundException
- (async) if a dataverse is provided in the options that does not exist.DatasetNotFoundException
- (async) if a dataset is provided which does not exist.CouchbaseException
- (async) if any other generic unhandled/unexpected errors.
-
dropIndex
public CompletableFuture<Void> dropIndex(String indexName, String datasetName, DropIndexAnalyticsOptions options) Drops (removes) an index if it exists with custom options.- Parameters:
indexName
- the name of the index to drop.datasetName
- the dataset in which the index exists.options
- the custom options to apply.- Returns:
- a
CompletableFuture
completing when the operation is applied or failed with an error. - Throws:
IndexNotFoundException
- (async) if the index does not exist and not ignored via options.DataverseNotFoundException
- (async) if a dataverse is provided in the options that does not exist.DatasetNotFoundException
- (async) if a dataset is provided which does not exist.CouchbaseException
- (async) if any other generic unhandled/unexpected errors.
-
getPendingMutations
Returns the pending mutations for different dataverses.- Returns:
- a
CompletableFuture
completing with the pending mutations or failed with an error. - Throws:
CouchbaseException
- (async) if any other generic unhandled/unexpected errors.
-
getPendingMutations
public CompletableFuture<Map<String,Map<String, getPendingMutationsLong>>> (GetPendingMutationsAnalyticsOptions options) Returns the pending mutations for different dataverses with custom options.- Parameters:
options
- the custom options to apply.- Returns:
- a
CompletableFuture
completing with the pending mutations or failed with an error. - Throws:
CouchbaseException
- (async) if any other generic unhandled/unexpected errors.
-
connectLink
Connects the analytics link for the default dataverse (Default.Local).- Returns:
- a
CompletableFuture
completing when the operation is applied or failed with an error. - Throws:
CouchbaseException
- (async) if any other generic unhandled/unexpected errors.
-
connectLink
Connects the analytics link for the default dataverse with custom options.- Parameters:
options
- the custom options to apply.- Returns:
- a
CompletableFuture
completing when the operation is applied or failed with an error. - Throws:
LinkNotFoundException
- (async) if the link does not exist.DataverseNotFoundException
- (async) if a dataverse is provided in the options that does not exist.CouchbaseException
- (async) if any other generic unhandled/unexpected errors.
-
disconnectLink
Disconnects the analytics link for the default dataverse (Default.Local).- Returns:
- a
CompletableFuture
completing when the operation is applied or failed with an error. - Throws:
CouchbaseException
- (async) if any other generic unhandled/unexpected errors.
-
disconnectLink
Disconnects the analytics link for the default dataverse with custom options.- Parameters:
options
- the custom options to apply.- Returns:
- a
CompletableFuture
completing when the operation is applied or failed with an error. - Throws:
LinkNotFoundException
- (async) if the link does not exist.DataverseNotFoundException
- (async) if a dataverse is provided in the options that does not exist.CouchbaseException
- (async) if any other generic unhandled/unexpected errors.
-
createLink
Creates a new analytics link.- Parameters:
link
- the name of the link that should be created.- Returns:
- a
CompletableFuture
completing when the operation is applied or failed with an error. - Throws:
InvalidArgumentException
- (async) if required parameters are not supplied or are invalid.AuthenticationFailureException
- (async) if the remote link cannot be authenticated on creation.LinkExistsException
- (async) if the link with the name already exists.CouchbaseException
- (async) if any other generic unhandled/unexpected errors.
-
createLink
Creates a new analytics link with custom options.- Parameters:
link
- the name of the link that should be created.options
- the custom options to apply.- Returns:
- a
CompletableFuture
completing when the operation is applied or failed with an error. - Throws:
InvalidArgumentException
- (async) if required parameters are not supplied or are invalid.AuthenticationFailureException
- (async) if the remote link cannot be authenticated on creation.LinkExistsException
- (async) if the link with the name already exists.CouchbaseException
- (async) if any other generic unhandled/unexpected errors.
-
replaceLink
Replaces an existing analytics link.- Parameters:
link
- the name of the link that should be replaced.- Returns:
- a
CompletableFuture
completing when the operation is applied or failed with an error. - Throws:
InvalidArgumentException
- (async) if required parameters are not supplied or are invalid.AuthenticationFailureException
- (async) if the remote link cannot be authenticated on replace.LinkNotFoundException
- (async) if the link does not exist.CouchbaseException
- (async) if any other generic unhandled/unexpected errors.
-
replaceLink
Replaces an analytics link with custom options.- Parameters:
link
- the name of the link that should be replaced.options
- the custom options to apply.- Returns:
- a
CompletableFuture
completing when the operation is applied or failed with an error. - Throws:
InvalidArgumentException
- (async) if required parameters are not supplied or are invalid.AuthenticationFailureException
- (async) if the remote link cannot be authenticated on replace.LinkNotFoundException
- (async) if the link does not exist.CouchbaseException
- (async) if any other generic unhandled/unexpected errors.
-
dropLink
Drops (removes) a link if it exists.- Parameters:
linkName
- the name of the link that should be dropped.dataverse
- the name of the dataverse in which the link exists.- Returns:
- a
CompletableFuture
completing when the operation is applied or failed with an error. - Throws:
LinkNotFoundException
- (async) if the link does not exist.DataverseNotFoundException
- (async) if a dataverse is provided that does not exist.CouchbaseException
- (async) if any other generic unhandled/unexpected errors.
-
dropLink
public CompletableFuture<Void> dropLink(String linkName, String dataverse, DropLinkAnalyticsOptions options) Drops (removes) a link if it exists with custom options.- Parameters:
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.- Returns:
- a
CompletableFuture
completing when the operation is applied or failed with an error. - Throws:
LinkNotFoundException
- (async) if the link does not exist.DataverseNotFoundException
- (async) if a dataverse is provided that does not exist.CouchbaseException
- (async) if any other generic unhandled/unexpected errors.
-
getLinks
Returns a (potentially empty) list of current analytics links.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 intoS3ExternalAnalyticsLink
, orCouchbaseRemoteAnalyticsLink
for specific attributes. In the future, more external link types might be supported - please consult the server documentation for more information.- Returns:
- a
CompletableFuture
completing with a (potentially empty) list of links or failed with an error. - Throws:
DataverseNotFoundException
- (async) if a dataverse is provided in the options that does not exist.CouchbaseException
- (async) if any other generic unhandled/unexpected errors.
-
getLinks
Returns a (potentially empty) list of current analytics links with custom 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 intoS3ExternalAnalyticsLink
, orCouchbaseRemoteAnalyticsLink
for specific attributes. In the future, more external link types might be supported - please consult the server documentation for more information.- Parameters:
options
- the custom options to apply.- Returns:
- a
CompletableFuture
completing with a (potentially empty) list of links or failed with an error. - Throws:
DataverseNotFoundException
- (async) if a dataverse is provided in the options that does not exist.CouchbaseException
- (async) if any other generic unhandled/unexpected errors.
-