#pragma once #include #include #include #include #include #include #include #include namespace NYT { namespace NDetail { //////////////////////////////////////////////////////////////////////////////// struct TResponseInfo; class TClient; using TClientPtr = ::TIntrusivePtr; namespace NRawClient { class TRawBatchRequest; } //////////////////////////////////////////////////////////////////////////////// class TBatchRequest : public IBatchRequest { public: TBatchRequest(const TTransactionId& defaultTransaction, ::TIntrusivePtr client); ~TBatchRequest(); virtual IBatchRequestBase& WithTransaction(const TTransactionId& transactionId) override; virtual ::NThreading::TFuture Create( const TYPath& path, ENodeType type, const TCreateOptions& options = TCreateOptions()) override; virtual ::NThreading::TFuture Remove( const TYPath& path, const TRemoveOptions& options = TRemoveOptions()) override; virtual ::NThreading::TFuture Exists( const TYPath& path, const TExistsOptions& options = TExistsOptions()) override; virtual ::NThreading::TFuture Get( const TYPath& path, const TGetOptions& options = TGetOptions()) override; virtual ::NThreading::TFuture Set( const TYPath& path, const TNode& node, const TSetOptions& options = TSetOptions()) override; virtual ::NThreading::TFuture List( const TYPath& path, const TListOptions& options = TListOptions()) override; virtual ::NThreading::TFuture Copy( const TYPath& sourcePath, const TYPath& destinationPath, const TCopyOptions& options = TCopyOptions()) override; virtual ::NThreading::TFuture Move( const TYPath& sourcePath, const TYPath& destinationPath, const TMoveOptions& options = TMoveOptions()) override; virtual ::NThreading::TFuture Link( const TYPath& targetPath, const TYPath& linkPath, const TLinkOptions& options = TLinkOptions()) override; virtual ::NThreading::TFuture Lock( const TYPath& path, ELockMode mode, const TLockOptions& options) override; virtual ::NThreading::TFuture Unlock( const TYPath& path, const TUnlockOptions& options) override; virtual ::NThreading::TFuture AbortOperation(const TOperationId& operationId) override; virtual ::NThreading::TFuture CompleteOperation(const TOperationId& operationId) override; ::NThreading::TFuture SuspendOperation( const TOperationId& operationId, const TSuspendOperationOptions& options) override; ::NThreading::TFuture ResumeOperation( const TOperationId& operationId, const TResumeOperationOptions& options) override; virtual ::NThreading::TFuture UpdateOperationParameters( const TOperationId& operationId, const TUpdateOperationParametersOptions& options) override; virtual ::NThreading::TFuture CanonizeYPath(const TRichYPath& path) override; virtual ::NThreading::TFuture> GetTableColumnarStatistics( const TVector& paths, const TGetTableColumnarStatisticsOptions& options) override; ::NThreading::TFuture CheckPermission( const TString& user, EPermission permission, const TYPath& path, const TCheckPermissionOptions& options) override; virtual void ExecuteBatch(const TExecuteBatchOptions& executeBatch) override; private: TBatchRequest(NDetail::NRawClient::TRawBatchRequest* impl, ::TIntrusivePtr client); private: TTransactionId DefaultTransaction_; ::TIntrusivePtr Impl_; THolder TmpWithTransaction_; ::TIntrusivePtr Client_; private: friend class NYT::NDetail::TClient; }; //////////////////////////////////////////////////////////////////////////////// } // namespace NDetail } // namespace NYT