The RavenDB client API is built with the notion of layers. At the top, and what you will usually interact with, are the DocumentStore and the DocumentSession.
They in turn, are built on top of the notion of Operations and Commands.
Operations are an encapsulation of a set of low level commands which are used to manipulate data, execute administrative tasks, and change the configuration on a server.
They are available in the DocumentStore under the operations, maintenance, and maintenance().server methods.
{PANEL:Common Operations}
Common operations include set based operations for Patching or removal of documents by using queries (more can be read here).
There is also the ability to handle distributed Compare Exchange operations and manage Attachments and Counters.
In order to execute an operation, you will need to use the send
or sendAsync
methods. Available overloads are:
{CODE-TABS}
{CODE-TAB:java:Sync Client_Operations_api@ClientApi\Operations\WhatAreOperations.java /}
{CODE-TAB:java:Async Client_Operations_api_async@ClientApi\Operations\WhatAreOperations.java /}
{CODE-TABS/}
{CODE:java Client_Operations_1@ClientApi\Operations\WhatAreOperations.java /}
{PANEL/}
{PANEL:Maintenance Operations}
Maintenance operations include operations for changing the configuration at runtime and for management of index operations.
{CODE:java Maintenance_Operations_api@ClientApi\Operations\WhatAreOperations.java /}
- DeleteIndexOperation
- DisableIndexOperation
- EnableIndexOperation
- ResetIndexOperation
- SetIndexesLockOperation
- SetIndexesPriorityOperation
- StartIndexOperation
- StartIndexingOperation
- StopIndexOperation
- StopIndexingOperation
- GetIndexErrorsOperation
- GetIndexOperation
- GetIndexesOperation
- GetTermsOperation
- IndexHasChangedOperation
- PutIndexesOperation
{CODE:java Maintenance_Operations_1@ClientApi\Operations\WhatAreOperations.java /}
{PANEL/}
{PANEL:Server Operations}
These type of operations contain various administrative and miscellaneous configuration operations.
{CODE-TABS} {CODE-TAB:java:Sync Server_Operations_api@ClientApi\Operations\WhatAreOperations.java /} {CODE-TAB:java:Async Server_Operations_api_async@ClientApi\Operations\WhatAreOperations.java /} {CODE-TABS/}
{CODE:java Server_Operations_1@ClientApi\Operations\WhatAreOperations.java /}
{PANEL/}
{NOTE By default, operations available in store.operations
or store.maintenance
are working on a default database that was setup for that store. To switch operations to a different database that is available on that server use the forDatabase method. /}