Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
impala::ImpalaServer::ScopedSessionState Class Reference
Collaboration diagram for impala::ImpalaServer::ScopedSessionState:

Public Member Functions

 ScopedSessionState (ImpalaServer *impala)
 
Status WithSession (const TUniqueId &session_id, boost::shared_ptr< SessionState > *session=NULL)
 
 ~ScopedSessionState ()
 Decrements the reference count so the session can be expired correctly. More...
 

Private Attributes

boost::shared_ptr< SessionStatesession_
 Reference-counted pointer to the session state object. More...
 
ImpalaServerimpala_
 Saved so that we can access ImpalaServer methods to get / return session state. More...
 

Detailed Description

Class that allows users of SessionState to mark a session as in-use, and therefore immune to expiration. The marking is done in WithSession() and undone in the destructor, so this class can be used to 'check-out' a session for the duration of a scope.

Definition at line 842 of file impala-server.h.

Constructor & Destructor Documentation

impala::ImpalaServer::ScopedSessionState::ScopedSessionState ( ImpalaServer impala)
inline

Definition at line 844 of file impala-server.h.

impala::ImpalaServer::ScopedSessionState::~ScopedSessionState ( )
inline

Decrements the reference count so the session can be expired correctly.

Definition at line 858 of file impala-server.h.

References impala_, impala::ImpalaServer::MarkSessionInactive(), and session_.

Member Function Documentation

Member Data Documentation

ImpalaServer* impala::ImpalaServer::ScopedSessionState::impala_
private

Saved so that we can access ImpalaServer methods to get / return session state.

Definition at line 869 of file impala-server.h.

Referenced by WithSession(), and ~ScopedSessionState().

boost::shared_ptr<SessionState> impala::ImpalaServer::ScopedSessionState::session_
private

Reference-counted pointer to the session state object.

Definition at line 866 of file impala-server.h.

Referenced by WithSession(), and ~ScopedSessionState().


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