NCBI C++ ToolKit
netstorage_rpc.hpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 #ifndef CONNECT_SERVICES__NETSTORAGE_RPC__HPP
2 #define CONNECT_SERVICES__NETSTORAGE_RPC__HPP
3 
4 /* $Id: netstorage_rpc.hpp 87146 2019-07-30 15:47:21Z sadyrovr $
5  * ===========================================================================
6  *
7  * PUBLIC DOMAIN NOTICE
8  * National Center for Biotechnology Information
9  *
10  * This software/database is a "United States Government Work" under the
11  * terms of the United States Copyright Act. It was written as part of
12  * the author's official duties as a United States Government employee and
13  * thus cannot be copyrighted. This software/database is freely available
14  * to the public for use. The National Library of Medicine and the U.S.
15  * Government have not placed any restriction on its use or reproduction.
16  *
17  * Although all reasonable efforts have been taken to ensure the accuracy
18  * and reliability of the software and data, the NLM and the U.S.
19  * Government do not and cannot warrant the performance or results that
20  * may be obtained by using this software or data. The NLM and the U.S.
21  * Government disclaim all warranties, express or implied, including
22  * warranties of performance, merchantability or fitness for any particular
23  * purpose.
24  *
25  * Please cite the author in any work or product based on this material.
26  *
27  * ===========================================================================
28  *
29  * Author: Dmitry Kazimirov
30  *
31  * File Description:
32  * Declarations for the NetStorage client API implementation.
33  *
34  */
35 
36 #include "netservice_api_impl.hpp"
37 
40 
42 
44 {
45  SNetStorageRPC(const TConfig& config, TNetStorageFlags default_flags);
47 
49  SNetStorageObjectImpl* Open(const string& object_loc) override;
50 
52  const CJsonNode& request,
54  CNetServer::TInstance server_to_use = NULL) const;
55 
56  CJsonNode MkStdRequest(const string& request_type) const;
57  CJsonNode MkObjectRequest(const string& request_type,
58  const string& object_loc) const;
59  CJsonNode MkObjectRequest(const string& request_type,
60  const string& unique_key, TNetStorageFlags flags) const;
62 
63  CNetService GetServiceIfLocator(const string& object_loc);
64 
66  {
67  return flags ? flags : m_DefaultFlags;
68  }
69 
70 private:
72 
73 public:
75 
77 
79 
81 
83 
84 private:
86 };
87 
89 
90 #endif /* CONNECT_SERVICES__NETSTORAGE_RPC__HPP */
CAtomicCounter –.
Definition: ncbicntr.hpp:71
Pool of recycled CCompoundID objects.
JSON node abstraction.
Client API for NetCache server.
static CS_CONNECTION * conn
Definition: ct_dynamic.c:25
static uch flags
#define NULL
Definition: ncbistd.hpp:225
unsigned TNetStorageFlags
Bitwise OR of ENetStorageFlags.
Definition: netstorage.hpp:147
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
NetCache client specs.
EVoid
To create a void (uninitialized) component instance.
TNetStorageFlags m_DefaultFlags
SNetStorageObjectImpl * Open(const string &object_loc) override
SNetStorageObjectImpl * Create(TNetStorageFlags flags) override
CJsonNode MkStdRequest(const string &request_type) const
TNetStorageFlags GetFlags(TNetStorageFlags flags) const
map< string, CNetService > m_ServiceMap
CNetService GetServiceIfLocator(const string &object_loc)
CNetCacheAPI m_NetCacheAPI
CCompoundIDPool m_CompoundIDPool
CJsonNode MkObjectRequest(const string &request_type, const string &object_loc) const
CNetService m_Service
CJsonNode Exchange(CNetService service, const CJsonNode &request, CNetServerConnection *conn=NULL, CNetServer::TInstance server_to_use=NULL) const
const TConfig m_Config
CAtomicCounter m_RequestNumber
SNetStorageRPC(const TConfig &config, TNetStorageFlags default_flags)
Modified on Sat Dec 02 09:19:23 2023 by modify_doxy.py rev. 669887