C# Class Raven.Client.Shard.ShardedDocumentStore

Inheritance: IDocumentStore
Show file Open project: robashton/ravendb Class Usage Examples

Public Methods

Method Description
AggressivelyCacheFor ( System.TimeSpan cacheDuration ) : IDisposable

Setup the context for aggressive caching.

aggressive caching means that we will not check the server to see whatever the response we provide is current or not, but will serve the information directly from the local cache without touching the server.

AsyncDatabaseCommandsFor ( string shardId ) : IAsyncDatabaseCommands
BulkInsert ( string database = null, BulkInsertOptions options = null ) : Raven.Client.Document.BulkInsertOperation
Changes ( string database = null ) : IDatabaseChanges
DatabaseCommandsFor ( string shardId ) : IDatabaseCommands
DisableAggressiveCaching ( ) : IDisposable

Setup the context for no aggressive caching

This is mainly useful for internal use inside RavenDB, when we are executing queries that has been marked with WaitForNonStaleResults, we temporarily disable aggressive caching.

Dispose ( ) : void

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

ExecuteIndex ( AbstractIndexCreationTask indexCreationTask ) : void

Executes the index creation against each of the shards.

ExecuteTransformer ( AbstractTransformerCreationTask transformerCreationTask ) : void

Executes the transformer creation

GetLastWrittenEtag ( ) : Etag

Gets the etag of the last document written by any session belonging to this document store

Initialize ( ) : IDocumentStore

Initializes this instance.

OpenAsyncSession ( ) : IAsyncDocumentSession

Opens the async session.

OpenAsyncSession ( string databaseName ) : IAsyncDocumentSession

Opens the async session.

OpenSession ( ) : IDocumentSession

Opens the session.

OpenSession ( Raven.Client.Document.OpenSessionOptions sessionOptions ) : IDocumentSession

Opens the session with the specified options.

OpenSession ( string database ) : IDocumentSession

Opens the session for a particular database

ShardedDocumentStore ( Raven.Client.Shard.ShardStrategy.ShardStrategy shardStrategy ) : System

Initializes a new instance of the ShardedDocumentStore class.

Private Methods

Method Description
OpenAsyncSessionInternal ( string dbName, IAsyncDatabaseCommands>.Dictionary shardDbCommands ) : IAsyncDocumentSession
OpenSessionInternal ( string database, IDatabaseCommands>.Dictionary shardDbCommands ) : IDocumentSession

Method Details

AggressivelyCacheFor() public method

Setup the context for aggressive caching.
aggressive caching means that we will not check the server to see whatever the response we provide is current or not, but will serve the information directly from the local cache without touching the server.
public AggressivelyCacheFor ( System.TimeSpan cacheDuration ) : IDisposable
cacheDuration System.TimeSpan Specify the aggressive cache duration
return IDisposable

AsyncDatabaseCommandsFor() public method

public AsyncDatabaseCommandsFor ( string shardId ) : IAsyncDatabaseCommands
shardId string
return IAsyncDatabaseCommands

BulkInsert() public method

public BulkInsert ( string database = null, BulkInsertOptions options = null ) : Raven.Client.Document.BulkInsertOperation
database string
options BulkInsertOptions
return Raven.Client.Document.BulkInsertOperation

Changes() public method

public Changes ( string database = null ) : IDatabaseChanges
database string
return IDatabaseChanges

DatabaseCommandsFor() public method

public DatabaseCommandsFor ( string shardId ) : IDatabaseCommands
shardId string
return IDatabaseCommands

DisableAggressiveCaching() public method

Setup the context for no aggressive caching
This is mainly useful for internal use inside RavenDB, when we are executing queries that has been marked with WaitForNonStaleResults, we temporarily disable aggressive caching.
public DisableAggressiveCaching ( ) : IDisposable
return IDisposable

Dispose() public method

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
return void

ExecuteIndex() public method

Executes the index creation against each of the shards.
public ExecuteIndex ( AbstractIndexCreationTask indexCreationTask ) : void
indexCreationTask AbstractIndexCreationTask
return void

ExecuteTransformer() public method

Executes the transformer creation
public ExecuteTransformer ( AbstractTransformerCreationTask transformerCreationTask ) : void
transformerCreationTask AbstractTransformerCreationTask
return void

GetLastWrittenEtag() public method

Gets the etag of the last document written by any session belonging to this document store
public GetLastWrittenEtag ( ) : Etag
return Etag

Initialize() public method

Initializes this instance.
public Initialize ( ) : IDocumentStore
return IDocumentStore

OpenAsyncSession() public method

Opens the async session.
public OpenAsyncSession ( ) : IAsyncDocumentSession
return IAsyncDocumentSession

OpenAsyncSession() public method

Opens the async session.
public OpenAsyncSession ( string databaseName ) : IAsyncDocumentSession
databaseName string
return IAsyncDocumentSession

OpenSession() public method

Opens the session.
public OpenSession ( ) : IDocumentSession
return IDocumentSession

OpenSession() public method

Opens the session with the specified options.
public OpenSession ( Raven.Client.Document.OpenSessionOptions sessionOptions ) : IDocumentSession
sessionOptions Raven.Client.Document.OpenSessionOptions
return IDocumentSession

OpenSession() public method

Opens the session for a particular database
public OpenSession ( string database ) : IDocumentSession
database string
return IDocumentSession

ShardedDocumentStore() public method

Initializes a new instance of the ShardedDocumentStore class.
public ShardedDocumentStore ( Raven.Client.Shard.ShardStrategy.ShardStrategy shardStrategy ) : System
shardStrategy Raven.Client.Shard.ShardStrategy.ShardStrategy The shard strategy.
return System