public static function Register($p_componentName, $p_ipAddress)
 {
     $component = CcServiceRegisterQuery::create()->findOneByDbName($p_componentName);
     if (is_null($component)) {
         $component = new CcServiceRegister();
         $component->setDbName($p_componentName);
     }
     // Need to convert ipv6 to ipv4 since Monit server does not appear
     // to allow access via an ipv6 address.
     // http://[::1]:2812 does not respond.
     // Bug: http://savannah.nongnu.org/bugs/?27608
     if ($p_ipAddress == "::1") {
         $p_ipAddress = "127.0.0.1";
     }
     $component->setDbIp($p_ipAddress);
     $component->save();
 }
 /**
  * Exclude object from result
  *
  * @param     CcServiceRegister $ccServiceRegister Object to remove from the list of results
  *
  * @return    CcServiceRegisterQuery The current query, for fluid interface
  */
 public function prune($ccServiceRegister = null)
 {
     if ($ccServiceRegister) {
         $this->addUsingAlias(CcServiceRegisterPeer::NAME, $ccServiceRegister->getDbName(), Criteria::NOT_EQUAL);
     }
     return $this;
 }
 /**
  * Adds an object to the instance pool.
  *
  * Propel keeps cached copies of objects in an instance pool when they are retrieved
  * from the database.  In some cases -- especially when you override doSelect*()
  * methods in your stub classes -- you may need to explicitly add objects
  * to the cache in order to ensure that the same objects are always returned by doSelect*()
  * and retrieveByPK*() calls.
  *
  * @param      CcServiceRegister $value A CcServiceRegister object.
  * @param      string $key (optional) key to use for instance map (for performance boost if key was already calculated externally).
  */
 public static function addInstanceToPool(CcServiceRegister $obj, $key = null)
 {
     if (Propel::isInstancePoolingEnabled()) {
         if ($key === null) {
             $key = (string) $obj->getDbName();
         }
         // if key === null
         self::$instances[$key] = $obj;
     }
 }