Check if we recently did a version check, if not do one now.

@throws ParseException
555081
public function periodicallyCheck()
    {
        if (!$this->isEnabled()) {
            return;
        }

        $data = $this->cache->fetch('version_check');
        if (!is_array($data)) {
            $this->check();
        }
    }
1371897
public static void checkVersionUpgradable(int oldVersion) 
                                     throws IOException {
    if (oldVersion > LAST_UPGRADABLE_LAYOUT_VERSION) {
      String msg = "*********** Upgrade is not supported from this older" +
                   " version of storage to the current version." + 
                   " Please upgrade to " + LAST_UPGRADABLE_HADOOP_VERSION +
                   " or a later version and then upgrade to current" +
                   " version. Old layout version is " + 
                   (oldVersion == 0 ? "'too old'" : (""+oldVersion)) +
                   " and latest layout version this software version can" +
                   " upgrade from is " + LAST_UPGRADABLE_LAYOUT_VERSION +
                   ". ************";
      LOG.error(msg);
      throw new IOException(msg); 
    }
    
  }
166217
public function isVersionCheck()
    {
        if ($_SERVER['REQUEST_METHOD'] != 'POST') {
            $this->_logger->log('Invalid request method', Icepay_Api_Logger::ERROR);
            return false;
        }

        if ($this->data->status != "VCHECK")
            return false;

        return true;
    }
417292
private function checkTusVersion() {
        $tusVersion = $this->getRequest()->getHeader('Tus-Resumable');
        if ($tusVersion instanceof \Zend\Http\Header\HeaderInterface) {
            return $tusVersion->getFieldValue() === self::TUS_VERSION;
        }
        return false;
    }
85025
def _check_version(version):
    """"""
    if version != pyphi.__version__:
        raise pyphi.exceptions.JSONVersionError(
            'Cannot load JSON from a different version of PyPhi. '
            'JSON version = {0}, current version = {1}.'.format(
                version, pyphi.__version__))
105741
protected void updateDataVersion() {
        DataVersionBean dv = new DataVersionBean();
        dv.setUpdatedOn(System.currentTimeMillis());
        Index index = new Index.Builder(dv).refresh(false)
                .index(getDefaultIndexName())
                .type("dataVersion").id("instance").build(); //$NON-NLS-1$ //$NON-NLS-2$
        getClient().executeAsync(index, new JestResultHandler<JestResult>() {
            @Override
            public void completed(JestResult result) {
                dataVersion = null;
            }
            @Override
            public void failed(Exception e) {
                dataVersion = null;
            }
        });
    }
1006947
@Override
    public void check() throws Exception {
        if (configFileEntry.refresh(configFile)) {
            log.debug("Compass config file changed, need compile.");
            buildInternal();
            return;
        }

        Result result = sassWatchable.check();
        if (!result.isEmpty()) {
            log.debug("File(s) changed:\n{}", result.toString());
            buildInternal();
        } else {
            log.debug("Nothing to compile - all css files are up to date");
        }
    }
216299
private static void checkSurefireVersion(Object mojo) throws Exception {
        try {
            // Check version specific methods/fields.
            // mojo.getClass().getMethod(GET_RUN_ORDER);
            getField(SKIP_TESTS_FIELD, mojo);
            getField(FORK_MODE_FIELD, mojo);

            // We will always require the following.
            getField(ARGLINE_FIELD, mojo);
            getField(EXCLUDES_FIELD, mojo);
        } catch (NoSuchMethodException ex) {
            throwMojoExecutionException(mojo, "Unsupported surefire version.  An alternative is to use select/restore goals.", ex);
        }
    }
354797
def _in_version(self, *versions):
        ""
        for version in versions:
            if (self._version == version
                or (isinstance(self._version, collections.Container) 
                    and version in self._version)):
                return True
        return False
1061364
private void ensureLegacyParsed() {
        if ((legacyChanged == false) || (legacyStrings == null)) {
            return;
        }
        serviceSet = null;
        if (legacyMap == null) {
            legacyMap = new LinkedHashMap<ServiceKey,Service>();
        } else {
            legacyMap.clear();
        }
        for (Map.Entry<String,String> entry : legacyStrings.entrySet()) {
            parseLegacyPut(entry.getKey(), entry.getValue());
        }
        removeInvalidServices(legacyMap);
        legacyChanged = false;
    }
469524
private static void checkOrcVersion(OrcDataSource orcDataSource, List<Integer> version)
    {
        if (version.size() >= 1) {
            int major = version.get(0);
            int minor = 0;
            if (version.size() > 1) {
                minor = version.get(1);
            }

            if (major > CURRENT_MAJOR_VERSION || (major == CURRENT_MAJOR_VERSION && minor > CURRENT_MINOR_VERSION)) {
                log.warn("ORC file %s was written by a newer Hive version %s. This file may not be readable by this version of Hive (%s.%s).",
                        orcDataSource,
                        Joiner.on('.').join(version),
                        CURRENT_MAJOR_VERSION,
                        CURRENT_MINOR_VERSION);
            }
        }
    }
688796
def process_check(pool,model,field,version):
  ""
  try: syncable=model[field]
  except pg.FieldError: return ['?field']
  if not isinstance(syncable,syncschema.Syncable): return ['here',None,syncable]
  if syncable.version()>version: # this includes version=None. this is the load case as well as update.
    return ['here',syncable.version(),syncable.generate()] # 'here' as in 'here, take this' or 'here you go'
  elif syncable.version()==version: return ['ok',version]
  elif syncable.version()<version: return ['upload',syncable.version()]
  else: raise RuntimeError("shouldn't get here")
1247201
private boolean handleNewInformation() {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "Parsing new information: " + getVirtualConnection());
        }

        final HttpInboundServiceContextImpl sc = getHTTPContext();

        if (!isPartiallyParsed()) {
            // this is the first pass through on parsing this new request
            // PK12235, check for a full stop only
            if (getChannel().isStopped()) {
                // channel stopped during the initial read, send error back
                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                    Tr.debug(tc, "Channel stopped during initial read");
                }
                sc.setHeadersParsed();
                // since we haven't parsed the request version, force the
                // response to the minimal 1.0 version
                sc.getResponse().setVersion(VersionValues.V10);
                sendErrorMessage(StatusCodes.UNAVAILABLE);
                return true;
            }
        }

        boolean completed = false;

        // if this is an http/2 link, don't perform additional parsing
        if (this.isAlpnHttp2Link(switchedVC)) {
            return false;
        }
        try {
            completed = sc.parseMessage();
        } catch (UnsupportedMethodException meth) {
            // no FFDC required
            sc.setHeadersParsed();
            sendErrorMessage(StatusCodes.NOT_IMPLEMENTED);
            setPartiallyParsed(false);
            return true;
        } catch (UnsupportedProtocolVersionException ver) {
            // no FFDC required
            sc.setHeadersParsed();
            sendErrorMessage(StatusCodes.UNSUPPORTED_VERSION);
            setPartiallyParsed(false);
            return true;
        } catch (MessageTooLargeException mtle) {
            // no FFDC required
            sc.setHeadersParsed();
            sendErrorMessage(StatusCodes.ENTITY_TOO_LARGE);
            setPartiallyParsed(false);
            return true;
        } catch (MalformedMessageException mme) {
            //no FFDC required
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "parseMessage encountered a MalformedMessageException : " + mme);
            }
            handleGenericHNIError(mme, sc);
            return true;
        } catch (IllegalArgumentException iae) {
            //no FFDC required
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "parseMessage encountered an IllegalArgumentException : " + iae);
            }
            handleGenericHNIError(iae, sc);
            return true;
        } catch (CompressionException ce) {
            //no FFDC required
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "parseMessage encountered a CompressionException : " + ce);
            }
            handleGenericHNIError(ce, sc);
            return true;
        } catch (Throwable t) {
            FFDCFilter.processException(t,
                                        "HttpInboundLink.handleNewInformation",
                                        "2", this);
            handleGenericHNIError(t, sc);
            return true;
        }

        // partialParsed is the opposite of the complete flag
        setPartiallyParsed(!completed);
        if (isPartiallyParsed()) {
            sc.setupReadBuffers(sc.getHttpConfig().getIncomingHdrBufferSize(), false);
        }
        return false;
    }
154210
public static function checkFatal() {
		$error = error_get_last();
		if( $error && static::isFatal($error['type']) ) {
			Yolk::exception(new \ErrorException($error['message'], 0, $error['type'], $error['file'], $error['line']));
		}
	}
304752
def check_version(self, check, timeout=None, metadata=None,
                      credentials=None):
        """"""
        return self.stub.CheckVersion(check, timeout=timeout,
                                      metadata=metadata,
                                      credentials=credentials)
1309070
def is_outdated(self):
        """"""
        if self.args.disable_check_update:
            # Check is disabled by configuration
            return False

        logger.debug("Check Glances version (installed: {} / latest: {})".format(self.installed_version(), self.latest_version()))
        return LooseVersion(self.latest_version()) > LooseVersion(self.installed_version())
371691
@GET
  @Path("/check")
  @Produces(APPLICATION_JSON)
  @Timed
  @ExceptionMetered
  public VersionCheckResponse versionCheck(
      @QueryParam("client") @DefaultValue("") final String client) {
    final PomVersion serverVersion = PomVersion.parse(Version.POM_VERSION);
    final VersionCompatibility.Status status;

    if (isNullOrEmpty(client)) {
      return new VersionCheckResponse(VersionCompatibility.Status.MISSING,
          serverVersion, Version.RECOMMENDED_VERSION);
    }

    final PomVersion clientVersion = PomVersion.parse(client);
    status = VersionCompatibility.getStatus(serverVersion, clientVersion);
    return new VersionCheckResponse(status, serverVersion, Version.RECOMMENDED_VERSION);
  }