1 #ifndef BLOB_STORAGE__HPP
2 #define BLOB_STORAGE__HPP
122 string ToString(
string const& prefix)
const;
216 shared_ptr<CCassConnection>
const& connection,
217 string const& registry_section,
218 string const& service,
223 shared_ptr<CSatInfoSchema>
const& old_schema,
224 shared_ptr<IRegistry const>
const&
registry,
225 string const& registry_section,
230 shared_ptr<CSatInfoSchema>
const& old_schema,
231 shared_ptr<IRegistry const>
const&
registry,
232 string const& registry_section,
233 shared_ptr<CCassConnection>& connection
236 string const& service,
string const& registry_section, vector<string>& connection_points);
284 string const& sat_info_keyspace,
285 string const& domain,
286 shared_ptr<CCassConnection> sat_info_connection,
287 shared_ptr<IRegistry const>
registry,
288 string const& registry_section
411 shared_ptr<CSatInfoSchema>
GetSchema()
const;
428 shared_ptr<CSatInfoSchema>& new_schema,
429 shared_ptr<CSatInfoSchema>
const& old_schema,
430 vector<SSatInfoEntry>&& sat_info,
#define BEGIN_IDBLOB_SCOPE
shared_ptr< CPSGMessages > m_SatInfoMessages
ESatInfoRefreshMessagesResult RefreshMessages(bool apply)
Refresh information for messages database {sat_info3.messages}.
optional< SSatInfoEntry > GetBlobKeyspace(int32_t sat) const
Get blob keyspace connection by sat id.
shared_ptr< CSatInfoSchema > GetSchema() const
Get configuration schema snapshot.
ESatInfoRefreshSchemaResult RefreshSchema(bool apply)
Refresh information for configuration database {sat_info3.sat2keyspace}.
CSatInfoSchemaProvider(string const &sat_info_keyspace, string const &domain, shared_ptr< CCassConnection > sat_info_connection, shared_ptr< IRegistry const > registry, string const ®istry_section)
vector< SSatInfoEntry > GetNAKeyspaces() const
Get list of BioseqNA keyspaces connections.
string m_SecureSatRegistrySection
bool m_ResolverKeyspaceRequired
optional< chrono::milliseconds > m_Timeout
shared_ptr< CCassConnection > x_GetSatInfoConnection() const
void SetResolverKeyspaceRequired(bool value)
Should existence of {resolver} keyspace be checked?
shared_ptr< CPSGMessages > GetMessages() const
Get messages snapshot.
void SetSatInfoConnection(shared_ptr< CCassConnection > sat_info_connection)
Changes Cassandra connection used to communicate with sat_info3.
string GetMessage(string const &name) const
Get configured message by name.
SSatInfoEntry GetResolverKeyspace() const
Get connection to resolver keyspace.
shared_ptr< IRegistry const > m_Registry
void SetSecureSatRegistrySection(string const ®istry_section)
Changes configuration domain for existing provider.
shared_ptr< string > m_RefreshErrorMessage
shared_ptr< CSatInfoSchema > m_SatInfoSchema
string GetRefreshErrorMessage() const
Get detailed message for last refresh operation (common for RefreshSchema and RefreshMessages).
void SetTimeout(chrono::milliseconds timeout)
Overrides data retrieval timeout.
shared_ptr< CCassConnection > m_SatInfoConnection
void x_SetRefreshErrorMessage(string const &message)
optional< ESatInfoRefreshSchemaResult > x_PopulateNewSchema(shared_ptr< CSatInfoSchema > &new_schema, shared_ptr< CSatInfoSchema > const &old_schema, vector< SSatInfoEntry > &&sat_info, map< int32_t, set< string >> &&secure_users)
int32_t GetMaxBlobKeyspaceSat() const
Get max id value for existing blob sat.
optional< SSatInfoEntry > GetIPGKeyspace() const
Get connection to IPG keyspace.
void SetDomain(string const &domain)
Changes configuration domain for existing provider.
map< string, shared_ptr< CCassConnection > > m_Service2Cluster
shared_ptr< CCassConnection > x_GetConnectionByService(string const &service, string const ®istry_section) const
optional< ESatInfoRefreshSchemaResult > x_AddConnection(shared_ptr< CCassConnection > const &connection, string const ®istry_section, string const &service, bool is_default)
map< string, shared_ptr< CCassConnection > > m_Point2Cluster
optional< SSatInfoEntry > GetIPGKeyspace() const
Get connection to IPG keyspace.
optional< ESatInfoRefreshSchemaResult > x_AddSatInfoEntry(SSatInfoEntry entry, shared_ptr< CSatInfoSchema > const &old_schema, shared_ptr< IRegistry const > const ®istry, string const ®istry_section, set< string > const &secure_users)
optional< ESatInfoRefreshSchemaResult > x_ResolveServiceName(string const &service, string const ®istry_section, vector< string > &connection_points)
int32_t GetMaxBlobKeyspaceSat() const
Get max id value for existing blob sat.
vector< SSatInfoEntry > GetNAKeyspaces() const
Get list of BioseqNA keyspaces connections.
optional< SSatInfoEntry > GetBlobKeyspace(int32_t sat) const
Get blob keyspace connection by sat id.
shared_ptr< CCassConnection > m_DefaultConnection
map< int32_t, set< string > > m_SecureSatUsers
shared_ptr< CCassConnection > x_GetConnectionByConnectionPoint(string const &connection_point) const
SSatInfoEntry m_ResolverKeyspace
vector< SSatInfoEntry > m_BioseqNaKeyspaces
string ToString() const
Print internal state of CSatInfoSchema.
optional< ESatInfoRefreshSchemaResult > x_ResolveConnectionByServiceName(string service, shared_ptr< CSatInfoSchema > const &old_schema, shared_ptr< IRegistry const > const ®istry, string const ®istry_section, shared_ptr< CCassConnection > &connection)
SSatInfoEntry GetResolverKeyspace() const
Get connection to resolver keyspace.
map< int32_t, SSatInfoEntry > m_BlobKeyspaces
optional< SSatInfoEntry > m_IPGKeyspace
optional< chrono::milliseconds > m_ResolveTimeout
string m_DefaultRegistrySection
Include a standard set of the NCBI C++ Toolkit most basic headers.
int32_t Int4
4-byte (32-bit) signed integer
const GenericPointer< typename T::ValueType > T2 value
Process information in the NCBI Registry, including working with configuration files.
static const char *const kChunkTableDefault
SBlobStorageConstants()=delete
static const char *const kChunkTableBig
SSatInfoEntry(SSatInfoEntry &&)=default
static constexpr int32_t kInvalidSat
set< string > m_SecureUsers
ECassSchemaType schema_type
shared_ptr< CCassConnection > GetConnection() const
Get public satellite connection.
bool IsSecureSat() const
Is satellite requires secure access.
string ToString(string const &prefix) const
Get string representation for debug.
SSatInfoEntry & operator=(SSatInfoEntry const &)=default
shared_ptr< CCassConnection > GetSecureConnection(string const &username) const
Get secure satellite connection.
SSatInfoEntry(SSatInfoEntry const &)=default
shared_ptr< CCassConnection > connection
SSatInfoEntry & operator=(SSatInfoEntry &&)=default
shared_ptr< CCassConnection > m_SecureConnection