55 catch (std::exception& e) {
56 ERR_POST(
"Could not flush session data: " << e.what());
59 ERR_POST(
"Could not flush session data");
76 "This method is not implemented for NetCache service.");
97 ITERATE(list<string>, it, pairs) {
98 string blobid, blobname;
110 names.push_back(it->first);
132 string& blobid =
m_Blobs[name];
155 "; causal exception attached");
166 string blobid =
i->second;
193 master_value += it->first +
"|" + it->second;
Exception classes used by the NCBI CGI framework.
CBlobStorage_NetCache – NetCache-based implementation of IBlobStorage.
virtual ~CCgiSession_NetCache()
virtual void SetAttribute(const string &name, const string &value)
Set attribute data as a string.
virtual CNcbiIstream & GetAttrIStream(const string &name, size_t *size=0)
Get input stream to read an attribute data from.
virtual void ModifySessionId(const string &new_id)
Modify session id.
virtual void DeleteSession()
Delete current session.
virtual TNames GetAttributeNames(void) const
Retrieve names of all attributes attached to this session.
virtual void Reset()
Close all open connections.
virtual string GetAttribute(const string &name) const
Get attribute data as string.
virtual bool LoadSession(const string &sessionid)
Load the session.
virtual CNcbiOstream & GetAttrOStream(const string &name)
Get output stream to write an attribute data to.
CBlobStorage_NetCache m_Storage
virtual void RemoveAttribute(const string &name)
Remove attribute from the session.
CCgiSession_NetCache(const IRegistry &)
Create Session Storage from the registry.
void x_CheckStatus() const
virtual string CreateNewSession()
Create a new empty session.
Client API for NetCache server.
container_type::const_iterator const_iterator
container_type::iterator iterator
const_iterator begin() const
const_iterator end() const
const_iterator find(const key_type &key) const
The NCBI C++ standard methods for dealing with std::string.
static const struct name_t names[]
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
CCgiSession::TNames TNames
#define ERR_POST(message)
Error posting with file, line number information but without error codes.
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
#define NCBI_RETHROW(prev_exception, exception_class, err_code, message)
Generic macro to re-throw an exception.
virtual void Reset()
Close all streams and connections.
virtual void DeleteBlob(const string &data_id)
Delete a blob.
virtual string GetBlobAsString(const string &data_id)
Get a blob content as a string.
virtual CNcbiOstream & CreateOStream(string &data_id, ELockMode lock_mode=eLockNoWait)
Get an output stream to a blob.
virtual CNcbiIstream & GetIStream(const string &data_id, size_t *blob_size_ptr=0, ELockMode lock_mode=eLockWait)
Get an input stream to a blob.
virtual string CreateEmptyBlob()
Create an new blob.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
IO_PREFIX::ostream CNcbiOstream
Portable alias for ostream.
IO_PREFIX::istream CNcbiIstream
Portable alias for istream.
static list< string > & Split(const CTempString str, const CTempString delim, list< string > &arr, TSplitFlags flags=0, vector< SIZE_TYPE > *token_pos=NULL)
Split a string using specified delimiters.
static bool SplitInTwo(const CTempString str, const CTempString delim, string &str1, string &str2, TSplitFlags flags=0)
Split a string into two pieces using the specified delimiters.
@ fSplit_MergeDelimiters
Merge adjacent delimiters.
const struct ncbi::grid::netcache::search::fields::SIZE size
const GenericPointer< typename T::ValueType > T2 value
Process information in the NCBI Registry, including working with configuration files.