C++ YT Wrapper
C++ library for working with YT clusters
Loading...
Searching...
No Matches
NYT::IBatchRequest Class Referenceabstract

Batch request object. More...

#include <batch_request.h>

Inheritance diagram for NYT::IBatchRequest:
NYT::IBatchRequestBase

Public Member Functions

virtual IBatchRequestBase & WithTransaction (const TTransactionId &transactionId)=0
 Temporary override current transaction.
IBatchRequestBase & WithTransaction (const ITransactionPtr &transaction)
virtual void ExecuteBatch (const TExecuteBatchOptions &options=TExecuteBatchOptions())=0
 Executes all subrequests of batch request.
Public Member Functions inherited from NYT::IBatchRequestBase
virtual ::NThreading::TFuture< TNodeId > Create (const TYPath &path, ENodeType type, const TCreateOptions &options=TCreateOptions())=0
 Create cypress node.
virtual ::NThreading::TFuture< void > Remove (const TYPath &path, const TRemoveOptions &options=TRemoveOptions())=0
 Remove cypress node.
virtual ::NThreading::TFuture< bool > Exists (const TYPath &path, const TExistsOptions &options=TExistsOptions())=0
 Check wether cypress node exists.
virtual ::NThreading::TFuture< TNode > Get (const TYPath &path, const TGetOptions &options=TGetOptions())=0
 Get cypress node.
virtual ::NThreading::TFuture< void > Set (const TYPath &path, const TNode &node, const TSetOptions &options=TSetOptions())=0
 Set cypress node.
virtual ::NThreading::TFuture< TNode::TListType > List (const TYPath &path, const TListOptions &options=TListOptions())=0
 List cypress directory.
virtual ::NThreading::TFuture< TNodeId > Copy (const TYPath &sourcePath, const TYPath &destinationPath, const TCopyOptions &options=TCopyOptions())=0
 Copy cypress node.
virtual ::NThreading::TFuture< TNodeId > Move (const TYPath &sourcePath, const TYPath &destinationPath, const TMoveOptions &options=TMoveOptions())=0
 Move cypress node.
virtual ::NThreading::TFuture< TNodeId > Link (const TYPath &targetPath, const TYPath &linkPath, const TLinkOptions &options=TLinkOptions())=0
 Create symbolic link.
virtual ::NThreading::TFuture< ILockPtr > Lock (const TYPath &path, ELockMode mode, const TLockOptions &options=TLockOptions())=0
 Lock cypress node.
virtual ::NThreading::TFuture< void > Unlock (const TYPath &path, const TUnlockOptions &options=TUnlockOptions())=0
 Unlock cypress node.
virtual ::NThreading::TFuture< void > AbortOperation (const TOperationId &operationId)=0
 Abort operation.
virtual ::NThreading::TFuture< void > CompleteOperation (const TOperationId &operationId)=0
 Force complete operation.
virtual ::NThreading::TFuture< void > SuspendOperation (const TOperationId &operationId, const TSuspendOperationOptions &options=TSuspendOperationOptions())=0
 Suspend operation.
virtual ::NThreading::TFuture< void > ResumeOperation (const TOperationId &operationId, const TResumeOperationOptions &options=TResumeOperationOptions())=0
 Resume operation.
virtual ::NThreading::TFuture< void > UpdateOperationParameters (const TOperationId &operationId, const TUpdateOperationParametersOptions &options=TUpdateOperationParametersOptions())=0
 Update parameters of running operation.
virtual ::NThreading::TFuture< TRichYPath > CanonizeYPath (const TRichYPath &path)=0
 Canonize cypress path.
virtual ::NThreading::TFuture< TVector< TTableColumnarStatistics > > GetTableColumnarStatistics (const TVector< TRichYPath > &paths, const TGetTableColumnarStatisticsOptions &options={})=0
 Get table columnar statistic.
virtual ::NThreading::TFuture< TCheckPermissionResponse > CheckPermission (const TString &user, EPermission permission, const TYPath &path, const TCheckPermissionOptions &options=TCheckPermissionOptions())=0
 Check permission for given path.

Detailed Description

Batch request object.

Allows to send multiple lightweight requests at once significantly reducing time of their execution.

Methods of this class accept same arguments as NYT::IClient methods but return TFuture that is set after execution of NYT::IBatchRequest::ExecuteBatch

See also
Example of usage

Member Function Documentation

◆ ExecuteBatch()

virtual void NYT::IBatchRequest::ExecuteBatch ( const TExecuteBatchOptions & options = TExecuteBatchOptions())
pure virtual

Executes all subrequests of batch request.

After execution of this method all TFuture objects returned by subrequests will be filled with either result or error.

Note
It is undefined in which order these requests are executed.
This method doesn't throw if subrequest emits error. Instead corresponding future is set with exception. So it is always important to check TFuture status.

Single TBatchRequest instance may be executed only once and cannot be modified (filled with additional requests) after execution. Exception is thrown on attempt to modify executed batch request or execute it again.

◆ WithTransaction()

virtual IBatchRequestBase & NYT::IBatchRequest::WithTransaction ( const TTransactionId & transactionId)
pure virtual

Temporary override current transaction.

Using WithTransaction user can temporary override default transaction. Example of usage: TBatchRequest batchRequest; auto noTxResult = batchRequest.Get("//some/path"); auto txResult = batchRequest.WithTransaction(tx).Get("//some/path");


The documentation for this class was generated from the following file: