|  | 
| pthread_rwlock_t * | CreateLock (const std::string &name, bool throw_exception_if_exists=true) | 
|  | 
| pthread_rwlock_t * | ReadLock (const std::string &name) | 
|  | 
| pthread_rwlock_t * | WriteLock (const std::string &name) | 
|  | 
| pthread_rwlock_t * | Unlock (const std::string &name=std::string("app")) | 
|  | 
| pthread_rwlock_t * | RootReadLock () | 
|  | 
| pthread_rwlock_t * | RootWriteLock () | 
|  | 
| pthread_rwlock_t * | RootUnLock () | 
|  | 
| pthread_rwlock_t * | RootFillLock (JEventProcessor *proc) | 
|  | 
| pthread_rwlock_t * | RootFillUnLock (JEventProcessor *proc) | 
|  | 
| pthread_rwlock_t * | GetReadWriteLock (std::string &name) | 
|  | 
| pthread_rwlock_t * | GetRootReadWriteLock () | 
|  | 
| pthread_rwlock_t * | GetRootFillLock (JEventProcessor *proc) | 
|  | 
| virtual | ~JService ()=default | 
|  | JServices may require other JServices, which may be loaded out of order from different plugins. 
 | 
|  | 
| void | DoInit (JServiceLocator *) | 
|  | 
| virtual void | acquire_services (JServiceLocator *) | 
|  | 
| void | SetLevel (JEventLevel level) | 
|  | 
| void | SetCallbackStyle (CallbackStyle style) | 
|  | 
| void | SetPrefix (std::string prefix) | 
|  | 
| void | SetTypeName (std::string type_name) | 
|  | For convenience, we provide a NAME_OF_THIS macro so that the user doesn't have to store the type name as a string, because that could get out of sync if automatic refactoring tools are used. 
 | 
|  | 
| JApplication * | GetApplication () const | 
|  | 
| JLogger & | GetLogger () | 
|  | 
| void | Wire (JApplication *app) | 
|  | 
| bool | IsEnabled () const | 
|  | 
| void | SetEnabled (bool is_enabled) | 
|  | 
| std::string | GetPrefix () const | 
|  | 
| JEventLevel | GetLevel () const | 
|  | 
| std::string | GetLoggerName () const | 
|  | 
| std::string | GetPluginName () const | 
|  | 
| void | SetLoggerName (std::string logger_name) | 
|  | 
| void | SetPluginName (std::string plugin_name) | 
|  | 
| std::string | GetTypeName () const | 
|  | 
| virtual void | Summarize (JComponentSummary &) const | 
|  | 
| CallbackStyle | GetCallbackStyle () const | 
|  | 
| void | SetApplication (JApplication *app) | 
|  | 
| void | SetLogger (JLogger logger) | 
|  | 
| template<typename F > | 
| void | CallWithJExceptionWrapper (std::string func_name, F func) | 
|  | 
| void | DoInit () | 
|  | 
| virtual void | Init () | 
|  | 
| void | RegisterParameter (ParameterBase *parameter) | 
|  | 
| void | RegisterService (ServiceBase *service) | 
|  | 
| const std::vector< ParameterBase * > | GetAllParameters () const | 
|  | 
  
  | 
        
          | pthread_rwlock_t * JLockService::ReadLock | ( | const std::string & | name | ) |  |  | inline | 
 
Lock a global, named, rw_lock for reading. If a lock with that name does not exist, then create one and lock it for reading.
This is a little tricky. Access to the map of rw locks must itself be controlled by a rw lock. This means we incure the overhead of two locks and one unlock for every call to this method. Furthermore, to keep this efficient, we want to try only read locking the map at first. If we fail to find the requested lock in the map, we must release the map's read lock and try creating the new lock.
 
 
  
  | 
        
          | pthread_rwlock_t * JLockService::WriteLock | ( | const std::string & | name | ) |  |  | inline | 
 
Lock a global, named, rw_lock for writing. If a lock with that name does not exist, then create one and lock it for writing.
This is a little tricky. Access to the map of rw locks must itself be controlled by a rw lock. This means we incure the overhead of two locks and one unlock for every call to this method. Furthermore, to keep this efficient, we want to try only read locking the map at first. If we fail to find the requested lock in the map, we must release the map's read lock and try creating the new lock.