获取服务注册对象

@return 服务注册信息保存者
961872
@SuppressWarnings("unchecked")
    public static <E> ServiceRegistry<E> getInstance() {
        if (instance == null) {
            synchronized (ServiceRegistry.class) {
                if (instance == null) {
                    instance = new ServiceRegistry<E>();
                }
            }
        }
        return instance;
    }
1121114
public function save()
    {
        $path = $this->paths['customPath'];
        $currentLanguage = $this->getLanguage();

        $result = true;
        if (!empty($this->changedData)) {
            foreach ($this->changedData as $scope => $data) {
                if (!empty($data)) {
                    $result &= $this->getFileManager()->mergeContents(array($path, $currentLanguage, $scope.'.json'), $data, true);
                }
            }
        }

        if (!empty($this->deletedData)) {
            foreach ($this->deletedData as $scope => $unsetData) {
                if (!empty($unsetData)) {
                    $result &= $this->getFileManager()->unsetContents(array($path, $currentLanguage, $scope.'.json'), $unsetData, true);
                }
            }
        }

        $this->clearChanges();

        return (bool) $result;
    }
797396
public function save()
    {
        $query = new QueryBuilder(self::$_connection);

        if($this->_isInsert) {
            $query->insert($this->getTable())
                  ->values($this->_changed);

            $id = self::$_connection->insert($query->getQuery());
            $this->_data[$this->_primaryKey] = $id;

            $this->_isInsert = false;
            $this->_changed  = [];

            return;
        }

        $query->update($this->getTable())
              ->set($this->_changed)
              ->where([
                  $this->_primaryKey => $this->_data[$this->_primaryKey]
              ])
              ->execute();

        $this->_changed = [];
    }
342228
protected DatabaseConnection getSavedConnection() {
		NestedConnection nested = specialConnection.get();
		if (nested == null) {
			return null;
		} else {
			return nested.connection;
		}
	}
1222246
public function save(){
    $table  = static::persistenceOptions('table');
    $op     = static::persistenceOptions();
    $cb     = static::persistenceSave();

    // Use standard persistence on DB layer
    $cb = $cb ? Closure::bind($cb, $this) : [$this,'persistenceSaveDefault'];
    return $cb($table,$op);
  }
1123727
public String savePath() {
        torrent_status ts = th.status(torrent_handle.query_save_path);
        return ts.getSave_path();
    }
688014
public String dump()
   {
      StringBuilder res = new StringBuilder("OWNER: ").append(owner != null ? owner : "null").append("\n");
      if (accessList != null)
      {
         for (AccessControlEntry a : accessList)
         {
            res.append(a.getAsString()).append("\n");
         }
      }
      else
      {
         res.append("null");
      }
      return res.toString();
   }
806334
public function saveMessages()
    {
        if (!$this->getId()) {
            return $this->save();
        }

        $connection = Mage::getSingleton('core/resource')->getConnection('core_write');
        /* @var $connection Varien_Db_Adapter_Interface */

        $count = $connection
            ->update(
                $this->getResource()->getMainTable(),
                array('messages' => $this->getMessages()),
                array('schedule_id = ?' => $this->getId())
            );

        if (!$count) {
            /**
             * Check if the row was not updated because of data truncation.
             */
            $warning = $this->_getPdoWarning($connection->getConnection());
            if ($warning && $warning->Code = 1265) {
                $maxLength = strlen($this->getMessages()) - 5000;
                $this->setMessages($warning->Level . ': ' .
                    str_replace(' at row 1', '.', $warning->Message) . PHP_EOL . PHP_EOL .
                    '...' . substr($this->getMessages(), -$maxLength));
            }
        }

        return $this;
    }
1001642
public function save()
    {
        $table = $this->table;
        $params = array();

        $query = "UPDATE {$table->getTableName()} SET ";
        $iValue = 0;

        foreach ($this->_data as $key => $value) {
            if ($key == $table->getPrimaryKey()) {
                continue;
            }

            $query .= "$key = :value$iValue, ";
            $params[":value$iValue"] = $value;
            $iValue++;
        }

        $query = substr($query, 0, -2);
        $pk = $this->_data[$table->getPrimaryKey()];
        $query .= " WHERE {$table->getPrimaryKey()} = $pk";

        return $this->_save($query, $params);
    }
829632
private File getStorageDir() {
        String externalStorageState = Environment.getExternalStorageState();
        if (!externalStorageState.equals(Environment.MEDIA_MOUNTED)) {
            return null;
        }

        // 默认在外置程序包下面.logs 文件夹
        File file = getExternalStorageDirectory();

        if (fileName.startsWith("/")) {
            File tmp = new File(fileName);
            if (tmp.isDirectory())
                return tmp;

            return new File(file, getFileNameWithoutExtension(fileName));
        }

        String tmp = Environment.getExternalStorageDirectory().getPath();
        if (fileName.startsWith(tmp)) {
            file = new File(file, fileName.replace(tmp, ""));
            return file;
        }

        file = new File(file, "logs");
        file.mkdirs();
        return file;
    }
125930
public function save()
    {
        $data = $this->arrayCache->getData();

        // Do save in case we have at least one change in configuration
        if ($this->arraySignature->hasChanged($data)) {
            if (!$this->write()) {
                return false;
            }
        }

        return true;
    }
774766
public function save(){
        if($this->beforeSave()){
            if($this->isNew()){
                $data = $this->_dirty;
                
                //insert
                if(false !== $rst = $this->_db->builder()->insert($this->getTable(), $data))
                {
                    if(is_string($this->getPK()) && $id = $this->_db->lastInsertId()){
                        $data[$this->getPK()] = $id;
                    }
                    $this->_data = $data;
                    $this->_dirty = array();
                    $this->_isNew = false;
                    $this->afterSave();
                    return $rst;
                }
            }
            else{
                if($this->isDirty()){
                    //update
                    $pkConditions = $this->buildPKConditions();
                    if(false !== $rst = $this->_db->builder()->update($this->getTable(), $this->_dirty, $pkConditions[0], $pkConditions[1])){
                        $this->_data = array_merge($this->_data, $this->_dirty);
                        $this->_dirty = array();
                        $this->afterSave();
                        return $rst;
                    }
                }
            }
        }
        
        return false;
    }
918814
public byte[] getData() {
		// this.count不可能==0
		int classInfoLength = writeDependClasses();
		if (classInfoLength > 0) {
			byteArray.writeInt4(classInfoLength);
		}
		byte[] data = byteArray.toBytes();
		if (classInfoLength > 0) {
			data[this.offsetLength] = XsonConst.HEAD_1;
		}
		byteArray = null;
		return data;
	}
214905
public static function saveAll() {
		$i = 0;
		foreach (self::$_lPoolDataChange as $sConfig => $lPool) {
			foreach ($lPool as $mID => $aChange) {
				if ($aChange === self::$_lPoolData[$sConfig][$mID]) {
					$o = new $sConfig();
					$o->save();
					$i++;
				}
			}
		}
		return $i;
	}
12629
public function save()
    {
        if ($this->validate() && (bool)$this->getUser()->updateAttributes(['nickname' => $this->nickname])) {
            return $this->getUser();
        }
        return false;
    }
529574
public function save()
    {
        if (!empty($this->ltiResultSourcedId) && !is_null($this->resourceLink)) {
            $ok = $this->resourceLink->getConsumer()->getStorage()->userSave($this);
        } else {
            $ok = true;
        }

        return $ok;
    }
95178
public function save()
    {
        $ok = $this->consumer->getStorage()->resourceLinkSave($this);
        if ($ok) {
            $this->settingsChanged = false;
        }

        return $ok;
    }