// LoadRefresh retrieves refresh AccessData. Client information MUST be loaded together.
// AuthorizeData and AccessData DON'T NEED to be loaded if not easily available.
// Optionally can return error if expired.
969855
func (s *storage) LoadRefresh(token string) (*osin.AccessData, error) {
	return nil, errors.New("not implemented")
}
764721
func (s *Server) Reload(file string) {
	s.logStatus("requesting reload: " + file)
	for conn := range s.connSet.conns {
		conn.reloadChan <- file
	}
}
1272150
func (r *Namespace) Reload() (*Namespace, error) {
	return r.collection.Get(r.Metadata.Name)
}
157341
func (t *TokenRefresher) RefreshAuthToken() (string, error) {
	tokens, err := t.uaaClient.RefreshAccessToken(t.cache.RefreshToken())
	if err != nil {
		return "", err
	}

	t.cache.SetAccessToken(tokens.AuthorizationToken())
	t.cache.SetRefreshToken(tokens.RefreshToken)
	return tokens.AuthorizationToken(), nil
}
240671
func refresh(pdbClient policyclientset.PodDisruptionBudgetInterface, pdb *policy.PodDisruptionBudget) *policy.PodDisruptionBudget {
	newPdb, err := pdbClient.Get(pdb.Name, metav1.GetOptions{})
	if err == nil {
		return newPdb
	}
	return pdb

}
859475
func (a *Application) Refresh() error {
	applications, closer := a.st.db().GetCollection(applicationsC)
	defer closer()

	err := applications.FindId(a.doc.DocID).One(&a.doc)
	if err == mgo.ErrNotFound {
		return errors.NotFoundf("application %q", a)
	}
	if err != nil {
		return errors.Errorf("cannot refresh application %q: %v", a, err)
	}
	return nil
}
1317876
func (s *ExistsService) Refresh(refresh bool) *ExistsService {
	s.refresh = &refresh
	return s
}
175315
func (r *ReplicationController) Reload() (*ReplicationController, error) {
	return r.collection.Get(r.Metadata.Name)
}
1192114
func (c *LoginController) Refresh(ctx *app.RefreshLoginContext) error {
	return proxy.RouteHTTPToPath(ctx, c.configuration.GetAuthShortServiceHostName(), authservice.RefreshTokenPath())
}
1176980
func (configMgr *ConfigurationManager) Refresh(sourceName string) error {
	err := configMgr.pullSourceConfigs(sourceName)
	if err != nil {
		openlogging.GetLogger().Errorf("fail to load configuration of %s source: %s", sourceName, err)
		errorMsg := "fail to load configuration of" + sourceName + " source"
		return errors.New(errorMsg)
	}
	return nil
}
1274428
func (app *Application) Refresh() {
	ev := &eventAppRefresh{}
	ev.SetEventNow()
	if scr := app.screen; scr != nil {
		go func() { scr.PostEventWait(ev) }()
	}
}
887072
func (info *UpgradeInfo) Refresh() error {
	doc, err := currentUpgradeInfoDoc(info.st)
	if err != nil {
		return errors.Trace(err)
	}
	info.doc = *doc
	return nil
}
244657
func (res *Resolver) Reload() {
	t := records.NewRecordGenerator(res.generatorOptions...)
	err := t.ParseState(res.config, res.masters...)

	if err == nil {
		timestamp := uint32(time.Now().Unix())
		// may need to refactor for fairness
		res.rsLock.Lock()
		defer res.rsLock.Unlock()
		atomic.StoreUint32(&res.config.SOASerial, timestamp)
		res.rs = t
		select {
		case <-res.ready:
			// noop because channel is already closed
		default:
			close(res.ready)
		}
	} else {
		logging.Error.Printf("Warning: Error generating records: %v; keeping old DNS state", err)
	}

	logging.PrintCurLog()
}
839238
func (loader *TemplateLoader) Refresh() (err *Error) {
	loader.templateMutex.Lock()
	defer loader.templateMutex.Unlock()

	loader.loadVersionSeed++
	runtimeLoader := &templateRuntime{loader: loader,
		version:     loader.loadVersionSeed,
		templateMap: map[string]Template{}}

	templateLog.Debug("Refresh: Refreshing templates from ", "path", loader.paths)
	if err = loader.initializeEngines(runtimeLoader, Config.StringDefault("template.engines", GO_TEMPLATE)); err != nil {
		return
	}
	for _, engine := range runtimeLoader.templatesAndEngineList {
		engine.Event(TEMPLATE_REFRESH_REQUESTED, nil)
	}
	RaiseEvent(TEMPLATE_REFRESH_REQUESTED, nil)
	defer func() {
		for _, engine := range runtimeLoader.templatesAndEngineList {
			engine.Event(TEMPLATE_REFRESH_COMPLETED, nil)
		}
		RaiseEvent(TEMPLATE_REFRESH_COMPLETED, nil)

		// Reset the runtimeLoader
		loader.runtimeLoader.Store(runtimeLoader)
	}()

	// Resort the paths, make sure the revel path is the last path,
	// so anything can override it
	revelTemplatePath := filepath.Join(RevelPath, "templates")
	// Go through the paths
	for i, o := range loader.paths {
		if o == revelTemplatePath && i != len(loader.paths)-1 {
			loader.paths[i] = loader.paths[len(loader.paths)-1]
			loader.paths[len(loader.paths)-1] = revelTemplatePath
		}
	}
	templateLog.Debug("Refresh: Refreshing templates from", "path", loader.paths)

	runtimeLoader.compileError = nil
	runtimeLoader.TemplatePaths = map[string]string{}

	for _, basePath := range loader.paths {
		// Walk only returns an error if the template loader is completely unusable
		// (namely, if one of the TemplateFuncs does not have an acceptable signature).

		// Handling symlinked directories
		var fullSrcDir string
		f, err := os.Lstat(basePath)
		if err == nil && f.Mode()&os.ModeSymlink == os.ModeSymlink {
			fullSrcDir, err = filepath.EvalSymlinks(basePath)
			if err != nil {
				templateLog.Panic("Refresh: Eval symlinks error ", "error", err)
			}
		} else {
			fullSrcDir = basePath
		}

		var templateWalker filepath.WalkFunc

		templateWalker = func(path string, info os.FileInfo, err error) error {
			if err != nil {
				templateLog.Error("Refresh: error walking templates:", "error", err)
				return nil
			}

			// Walk into watchable directories
			if info.IsDir() {
				if !loader.WatchDir(info) {
					return filepath.SkipDir
				}
				return nil
			}

			// Only add watchable
			if !loader.WatchFile(info.Name()) {
				return nil
			}

			fileBytes, err := runtimeLoader.findAndAddTemplate(path, fullSrcDir, basePath)
			if err != nil {
				// Add in this template name to the list of templates unable to be compiled
				runtimeLoader.compileErrorNameList = append(runtimeLoader.compileErrorNameList, filepath.ToSlash(path[len(fullSrcDir)+1:]))
			}
			// Store / report the first error encountered.
			if err != nil && runtimeLoader.compileError == nil {
				runtimeLoader.compileError, _ = err.(*Error)

				if nil == runtimeLoader.compileError {
					_, line, description := ParseTemplateError(err)

					runtimeLoader.compileError = &Error{
						Title:       "Template Compilation Error",
						Path:        path,
						Description: description,
						Line:        line,
						SourceLines: strings.Split(string(fileBytes), "\n"),
					}
				}
				templateLog.Errorf("Refresh: Template compilation error (In %s around line %d):\n\t%s",
					path, runtimeLoader.compileError.Line, err.Error())
			} else if nil != err { //&& strings.HasPrefix(templateName, "errors/") {

				if compileError, ok := err.(*Error); ok {
					templateLog.Errorf("Template compilation error (In %s around line %d):\n\t%s",
						path, compileError.Line, err.Error())
				} else {
					templateLog.Errorf("Template compilation error (In %s ):\n\t%s",
						path, err.Error())
				}
			}
			return nil
		}

		if _, err = os.Lstat(fullSrcDir); os.IsNotExist(err) {
			// #1058 Given views/template path is not exists
			// so no need to walk, move on to next path
			continue
		}

		funcErr := Walk(fullSrcDir, templateWalker)

		// If there was an error with the Funcs, set it and return immediately.
		if funcErr != nil {
			runtimeLoader.compileError = NewErrorFromPanic(funcErr)
			return runtimeLoader.compileError
		}
	}

	// Note: compileError may or may not be set.
	return runtimeLoader.compileError
}
295457
func (s *ShapeIndexIterator) refresh() {
	if s.position < len(s.index.cells) {
		s.id = s.index.cells[s.position]
		s.cell = s.index.cellMap[s.CellID()]
	} else {
		s.id = SentinelCellID
		s.cell = nil
	}
}
1216052
func (g *Generation) Refresh() error {
	col, closer := g.st.db().GetCollection(generationsC)
	defer closer()

	var doc generationDoc
	if err := col.FindId(g.doc.DocId).One(&doc); err != nil {
		return errors.Trace(err)
	}
	g.doc = doc
	return nil
}
60932
func (ca *CoreAdmin) Reload(core string) (*SolrResponse, error) {
	params := &url.Values{}
	params.Add("core", core)
	return ca.Action("RELOAD", params)
}