C# Class Couchbase.Management.BucketManager

An intermediate class for doing management operations on a Bucket.
Inheritance: IBucketManager
Afficher le fichier Open project: couchbase/couchbase-net-client

Méthodes publiques

Méthode Description
BuildN1qlDeferredIndexes ( ) : IList

Builds any indexes that have been created with the "defer" flag and are still in the "pending" state on the current IBucket.

BuildN1qlDeferredIndexesAsync ( ) : Task

Builds any indexes that have been created with the "defered" flag and are still in the "pending" state asynchronously.

CreateN1qlIndex ( string indexName, bool defer = false ) : IResult

Creates a secondary index on the current IBucket reference.

CreateN1qlIndexAsync ( string indexName, bool defer = false ) : Task

Creates a secondary index with optional fields asynchronously.

CreateN1qlPrimaryIndex ( bool defer = false ) : IResult

Creates the primary index for the current bucket if it doesn't already exist.

CreateN1qlPrimaryIndex ( string customName, bool defer = false ) : IResult

Creates a primary index on the current IBucket reference.

CreateN1qlPrimaryIndexAsync ( bool defer = false ) : Task

Creates a primary index on the current IBucket asynchronously.

CreateN1qlPrimaryIndexAsync ( string customName, bool defer = false ) : Task

Creates a named primary index on the current IBucket asynchronously.

Dispose ( ) : void
DropN1qlIndex ( string name ) : IResult

Drops a secondary index on the current IBucket reference.

DropN1qlIndexAsync ( string name ) : Task

Drops an index by name asynchronously.

DropN1qlPrimaryIndex ( ) : IResult

Drops the primary index on the current IBucket.

DropN1qlPrimaryIndex ( string customName ) : IResult

Drops the named primary index if it exists on the current IBucket.

DropN1qlPrimaryIndexAsync ( ) : Task

Drops the primary index of the current IBucket asynchronously.

DropNamedPrimaryIndexAsync ( string customName ) : Task

Drops the named primary index on the current IBucket asynchronously.

Flush ( ) : IResult

Destroys all documents stored within a bucket. This functionality must also be enabled within the server-side bucket settings for safety reasons.

FlushAsync ( ) : Task

Destroys all documents stored within a bucket. This functionality must also be enabled within the server-side bucket settings for safety reasons.

GetDesignDocument ( string designDocName ) : IResult

Retrieves the contents of a design document.

GetDesignDocumentAsync ( string designDocName ) : Task>

Retrieves the contents of a design document.

GetDesignDocumentsAsync ( bool includeDevelopment = false ) : Task>

Lists all existing design documents.

InsertDesignDocument ( string designDocName, string designDoc ) : IResult

Inserts a design document containing a number of views.

InsertDesignDocumentAsync ( string designDocName, string designDoc ) : Task

Inserts a design document containing a number of views.

ListN1qlIndexes ( ) : IndexResult

Lists the indexes for the current IBucket.

ListN1qlIndexesAsync ( ) : Task

Lists the indexes for a the current IBucket asynchronously.

RemoveDesignDocument ( string designDocName ) : IResult

Removes a design document.

RemoveDesignDocumentAsync ( string designDocName ) : Task

Removes a design document.

UpdateDesignDocument ( string designDocName, string designDoc ) : IResult

Updates a design document containing a number of views.

UpdateDesignDocumentAsync ( string designDocName, string designDoc ) : Task

Updates a design document containing a number of views.

WatchN1qlIndexes ( List indexNames, System.TimeSpan watchTimeout ) : IResult>

Watches all given indexes, polling the query service until they are "online" or the has expired.

WatchN1qlIndexesAsync ( List indexNames, System.TimeSpan watchTimeout ) : Task>>

Watches all given indexes, asynchronously polling the query service until they are "online" or the has expired.

Méthodes protégées

Méthode Description
ExecuteIndexRequest ( string statement ) : IResult

Executes the index request syncronously.

ExecuteIndexRequestAsync ( string statement ) : Task

Executes the index request asynchronously.

Private Methods

Méthode Description
BucketManager ( IBucket bucket, Couchbase.Configuration.Client.ClientConfiguration clientConfig, IDataMapper mapper, HttpClient httpClient, string username, string password ) : Common.Logging
GetDesignDocuments ( bool includeDevelopment = false ) : IResult
GetResult ( HttpResponseMessage httpResponseMessage ) : Task
GetResultAsString ( HttpResponseMessage httpResponseMessage ) : Task>
SetHeaders ( HttpRequestMessage request, Uri uri, string mediaType ) : void
ShouldRetryWatch ( IndexResult result, List indexNames ) : bool
UseSsl ( ) : bool

Method Details

BuildN1qlDeferredIndexes() public méthode

Builds any indexes that have been created with the "defer" flag and are still in the "pending" state on the current IBucket.
public BuildN1qlDeferredIndexes ( ) : IList
Résultat IList

BuildN1qlDeferredIndexesAsync() public méthode

Builds any indexes that have been created with the "defered" flag and are still in the "pending" state asynchronously.
public BuildN1qlDeferredIndexesAsync ( ) : Task
Résultat Task

CreateN1qlIndex() public méthode

Creates a secondary index on the current IBucket reference.
public CreateN1qlIndex ( string indexName, bool defer = false ) : IResult
indexName string Name of the index to create.
defer bool If set to true, the N1QL query will use the "with defer" syntax and the index will simply be "pending" (prior to 4.5) or "deferred" (at and after 4.5, see MB-14679).
Résultat IResult

CreateN1qlIndexAsync() public méthode

Creates a secondary index with optional fields asynchronously.
public CreateN1qlIndexAsync ( string indexName, bool defer = false ) : Task
indexName string Name of the index.
defer bool If set to true, the N1QL query will use the "with defer" syntax and the index will simply be "pending" (prior to 4.5) or "deferred" (at and after 4.5, see MB-14679).
Résultat Task

CreateN1qlPrimaryIndex() public méthode

Creates the primary index for the current bucket if it doesn't already exist.
public CreateN1qlPrimaryIndex ( bool defer = false ) : IResult
defer bool If set to true, the N1QL query will use the "with defer" syntax and the index will simply be "pending" (prior to 4.5) or "deferred" (at and after 4.5, see MB-14679).
Résultat IResult

CreateN1qlPrimaryIndex() public méthode

Creates a primary index on the current IBucket reference.
public CreateN1qlPrimaryIndex ( string customName, bool defer = false ) : IResult
customName string The name of the index.
defer bool If set to true, the N1QL query will use the "with defer" syntax and the index will simply be "pending" (prior to 4.5) or "deferred" (at and after 4.5, see MB-14679).
Résultat IResult

CreateN1qlPrimaryIndexAsync() public méthode

Creates a primary index on the current IBucket asynchronously.
public CreateN1qlPrimaryIndexAsync ( bool defer = false ) : Task
defer bool If set to true, the N1QL query will use the "with defer" syntax and the index will simply be "pending" (prior to 4.5) or "deferred" (at and after 4.5, see MB-14679).
Résultat Task

CreateN1qlPrimaryIndexAsync() public méthode

Creates a named primary index on the current IBucket asynchronously.
public CreateN1qlPrimaryIndexAsync ( string customName, bool defer = false ) : Task
customName string The name of the custom index.
defer bool If set to true, the N1QL query will use the "with defer" syntax and the index will simply be "pending" (prior to 4.5) or "deferred" (at and after 4.5, see MB-14679).
Résultat Task

Dispose() public méthode

public Dispose ( ) : void
Résultat void

DropN1qlIndex() public méthode

Drops a secondary index on the current IBucket reference.
public DropN1qlIndex ( string name ) : IResult
name string The name of the secondary index to drop.
Résultat IResult

DropN1qlIndexAsync() public méthode

Drops an index by name asynchronously.
public DropN1qlIndexAsync ( string name ) : Task
name string The name of the index to drop.
Résultat Task

DropN1qlPrimaryIndex() public méthode

Drops the primary index on the current IBucket.
public DropN1qlPrimaryIndex ( ) : IResult
Résultat IResult

DropN1qlPrimaryIndex() public méthode

Drops the named primary index if it exists on the current IBucket.
public DropN1qlPrimaryIndex ( string customName ) : IResult
customName string Name of primary index.
Résultat IResult

DropN1qlPrimaryIndexAsync() public méthode

Drops the primary index of the current IBucket asynchronously.
public DropN1qlPrimaryIndexAsync ( ) : Task
Résultat Task

DropNamedPrimaryIndexAsync() public méthode

Drops the named primary index on the current IBucket asynchronously.
public DropNamedPrimaryIndexAsync ( string customName ) : Task
customName string Name of the primary index to drop.
Résultat Task

ExecuteIndexRequest() protected méthode

Executes the index request syncronously.
protected ExecuteIndexRequest ( string statement ) : IResult
statement string The statement.
Résultat IResult

ExecuteIndexRequestAsync() protected méthode

Executes the index request asynchronously.
protected ExecuteIndexRequestAsync ( string statement ) : Task
statement string The statement.
Résultat Task

Flush() public méthode

Destroys all documents stored within a bucket. This functionality must also be enabled within the server-side bucket settings for safety reasons.
public Flush ( ) : IResult
Résultat IResult

FlushAsync() public méthode

Destroys all documents stored within a bucket. This functionality must also be enabled within the server-side bucket settings for safety reasons.
public FlushAsync ( ) : Task
Résultat Task

GetDesignDocument() public méthode

Retrieves the contents of a design document.
public GetDesignDocument ( string designDocName ) : IResult
designDocName string The name of the design document.
Résultat IResult

GetDesignDocumentAsync() public méthode

Retrieves the contents of a design document.
public GetDesignDocumentAsync ( string designDocName ) : Task>
designDocName string The name of the design document.
Résultat Task>

GetDesignDocumentsAsync() public méthode

Lists all existing design documents.
public GetDesignDocumentsAsync ( bool includeDevelopment = false ) : Task>
includeDevelopment bool Whether or not to show development design documents in the results.
Résultat Task>

InsertDesignDocument() public méthode

Inserts a design document containing a number of views.
public InsertDesignDocument ( string designDocName, string designDoc ) : IResult
designDocName string The name of the design document.
designDoc string A design document JSON string.
Résultat IResult

InsertDesignDocumentAsync() public méthode

Inserts a design document containing a number of views.
public InsertDesignDocumentAsync ( string designDocName, string designDoc ) : Task
designDocName string The name of the design document.
designDoc string A design document JSON string.
Résultat Task

ListN1qlIndexes() public méthode

Lists the indexes for the current IBucket.
public ListN1qlIndexes ( ) : IndexResult
Résultat IndexResult

ListN1qlIndexesAsync() public méthode

Lists the indexes for a the current IBucket asynchronously.
public ListN1qlIndexesAsync ( ) : Task
Résultat Task

RemoveDesignDocument() public méthode

Removes a design document.
public RemoveDesignDocument ( string designDocName ) : IResult
designDocName string The name of the design document.
Résultat IResult

RemoveDesignDocumentAsync() public méthode

Removes a design document.
public RemoveDesignDocumentAsync ( string designDocName ) : Task
designDocName string The name of the design document.
Résultat Task

UpdateDesignDocument() public méthode

Updates a design document containing a number of views.
public UpdateDesignDocument ( string designDocName, string designDoc ) : IResult
designDocName string The name of the design document.
designDoc string A design document JSON string.
Résultat IResult

UpdateDesignDocumentAsync() public méthode

Updates a design document containing a number of views.
public UpdateDesignDocumentAsync ( string designDocName, string designDoc ) : Task
designDocName string The name of the design document.
designDoc string A design document JSON string.
Résultat Task

WatchN1qlIndexes() public méthode

Watches all given indexes, polling the query service until they are "online" or the has expired.
public WatchN1qlIndexes ( List indexNames, System.TimeSpan watchTimeout ) : IResult>
indexNames List The list of indexes to watch for.
watchTimeout System.TimeSpan The timeout for the watch.
Résultat IResult>

WatchN1qlIndexesAsync() public méthode

Watches all given indexes, asynchronously polling the query service until they are "online" or the has expired.
public WatchN1qlIndexesAsync ( List indexNames, System.TimeSpan watchTimeout ) : Task>>
indexNames List The list of indexes to watch for.
watchTimeout System.TimeSpan The timeout for the watch.
Résultat Task>>