<pre>
Time a static file served by this handler should be cached
by web proxies and browsers.
</pre>

<code>.google.protobuf.Duration expiration = 5;</code>
328207
public com.google.protobuf.Duration getExpiration() {
    return expiration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : expiration_;
  }
901707
public boolean isPreviewSessionExpired(){
        Long urlCreationTime = getUrlCreationTime();
        if (urlCreationTime == null){
            return true;
        }
        return (System.currentTimeMillis() - urlCreationTime) < (60 * 60 * 1000);
    }
1311370
private <V> boolean isExpired(CacheValue<V> value) {
    long diff = ticker.read() - value.getCreationTime();
    return diff > maxEntryAgeNanos;
  }
490496
void expireAfterAccess(String key, @Nullable String value) {
    requireArgument(expireAfterAccessDuration == UNSET_INT, "expireAfterAccess was already set");
    expireAfterAccessDuration = parseDuration(key, value);
    expireAfterAccessTimeUnit = parseTimeUnit(key, value);
  }
370777
public synchronized float probesPerSecond() {

    Instant now = new Instant();

    Instant event = null;
    int events = 0;
    boolean done = false;
    long timeWindow = 0;
    long oldestTime = 0;

    do {
      event = messages.poll();
      if (event != null) {
        events++;
        if (events == 1)
          oldestTime = event.getMillis();
        done = event.getMillis() >= now.getMillis();
      } else {
        done = true;
      }
    } while (!done);

    timeWindow = now.getMillis() - oldestTime;

    float mps = (float) events / timeWindow;
    mps = (float) (mps * 1000.0);

    return mps;

  }
661560
public static TraceEvent endDuration(Object... args) {
        return new TraceEvent(TraceEventType.DURATION_END, null, null, args);
    }
525223
public Duration getBaselineDuration()
   {
      Object result = getCachedValue(TaskField.BASELINE_DURATION);
      if (result == null)
      {
         result = getCachedValue(TaskField.BASELINE_ESTIMATED_DURATION);
      }

      if (!(result instanceof Duration))
      {
         result = null;
      }
      return (Duration) result;
   }
1046697
@SuppressWarnings("unchecked")
	@Override
	public long getLastModified(HttpServletRequest request) throws IOException {
		long lastModified = _lastModified;
		IAggregator aggregator = (IAggregator)request.getAttribute(IAggregator.AGGREGATOR_REQATTRNAME);
		IOptions options = aggregator.getOptions();
		// Don't check last modified dates of source files on every request in production mode
		// for performance reasons.  _validateLastModified is a transient that gets initialize
		// to true whenever this object is de-serialized (i.e. on server startup).
		if (lastModified == -1 || _validateLastModified.getAndSet(false) || options.isDevelopmentMode()) {
			// see if we already determined the last modified time for this request
			Object obj = request.getAttribute(LAST_MODIFIED_PROPNAME);
			if (obj == null) {
				// Determine latest last-modified time from source files in moduleList
				ModuleList moduleFiles = getModules(request);
				lastModified = getLastModified(aggregator, moduleFiles);
				// Get last-modified date of config file
				lastModified = Math.max(
						lastModified,
						aggregator.getConfig().lastModified());
				List<String> cacheInfoReport = null;
				if (_isReportCacheInfo) {
					cacheInfoReport = (List<String>)request.getAttribute(LAYERCACHEINFO_PROPNAME);
				}
				synchronized(this) {
					if (_lastModified == -1) {
						// Initialize value of instance property
						_lastModified = lastModified;
						if (cacheInfoReport != null) {
							cacheInfoReport.add("update_lastmod1"); //$NON-NLS-1$
						}
					}
				}
				request.setAttribute(LAST_MODIFIED_PROPNAME, lastModified);
				if (log.isLoggable(Level.FINER)) {
					log.finer("Returning calculated last modified "  //$NON-NLS-1$
							+ lastModified + " for layer " +  //$NON-NLS-1$
							request.getAttribute(IHttpTransport.REQUESTEDMODULENAMES_REQATTRNAME).toString());
				}
			} else {
				lastModified = (Long)obj;
				if (log.isLoggable(Level.FINER)) {
					log.finer("Returning last modified "  //$NON-NLS-1$
							+ lastModified + " from request for layer " +  //$NON-NLS-1$
							request.getAttribute(IHttpTransport.REQUESTEDMODULENAMES_REQATTRNAME).toString());
				}
			}
		} else {
			if (log.isLoggable(Level.FINER)) {
				log.finer("Returning cached last modified "  //$NON-NLS-1$
						+ lastModified + " for layer " + //$NON-NLS-1$
						request.getAttribute(IHttpTransport.REQUESTEDMODULENAMES_REQATTRNAME).toString());
			}
		}
		return lastModified;
	}
285519
private void timeoutExpired(final Timeout timeout, final TimeoutContext context) {
        try {
            removeExpiredTimeout(timeout);

            for (TimeoutExpired callback : callbacks) {
                if (callback instanceof TimeoutExpirationCallback) {
                    ((TimeoutExpirationCallback) callback).expired(timeout, context);
                } else {
                    callback.expired(timeout);
                }
            }
        } catch (Exception ex) {
            // catch all exceptions. otherwise calling timeout thread of timers thread pool will be terminated.
            LOG.error("Error handling timeout.", ex);
        }
    }
198540
public long expire(long time) {
    for (int logSize = (Long.SIZE - 1) - numberOfLeadingZeros(last); logSize >= 0; logSize--) {
      boolean live = false;
      for (int i = min_l(logSize); i < max_l(logSize); i++) {
        long end = boxes[i];
        if (end != MIN_VALUE) {
          if ((time - end) >= window) {
            total -= 1L << logSize;
            boxes[i] = MIN_VALUE;
          } else {
            live = true;
          }
        }
      }
      if (live) {
        last = 1L << logSize;
        return count();
      }
    }
    last = 0;
    return 0;
  }
816827
private static long timeFromQualifier(final byte[] qualifier, 
      final long base_time) {
    final long offset;
    if (qualifier.length == 3) {
      offset = Bytes.getUnsignedShort(qualifier, 1);
      return (base_time + offset) * 1000;
    } else {
      offset = Bytes.getUnsignedInt(qualifier, 1);
      return (base_time * 1000) + offset;
    }
  }
794627
void gc() {
        if (stopped) {
            return;
        }
        long expirationTime = System.currentTimeMillis() - timeout;
        for (Iterator<Map.Entry<InputStreamKey, TimedStreamEntry>> iter = streamMap.entrySet().iterator(); iter.hasNext();) {
            if (stopped) {
                return;
            }
            Map.Entry<InputStreamKey, TimedStreamEntry> entry = iter.next();
            TimedStreamEntry timedStreamEntry = entry.getValue();
            if (timedStreamEntry.timestamp.get() <= expirationTime) {
                iter.remove();
                InputStreamKey key = entry.getKey();
                //noinspection SynchronizationOnLocalVariableOrMethodParameter
                synchronized (timedStreamEntry) { // ensure there's no race with a request that got a ref before we removed it
                    closeStreamEntry(timedStreamEntry, key.requestId, key.index);
                }
            }
        }
    }
709424
public void setExpiryTime(long pExpiryTime) {
        long oldEexpiryTime = expiryTime;

        expiryTime = pExpiryTime;

        if (expiryTime < oldEexpiryTime) {
            // Expire now
            nextExpiryTime = 0;
            removeExpiredEntries();
        }
    }
1208828
private long getLastTimeStamp(Path pathToCheck) {
    long lastTimeStamp = -1;
    long tmpTimeStamp = -1;
    try {
      for (FileStatus fileStat: fs.listStatus(pathToCheck)) {
        Path srcPath = fileStat.getPath();
        if (!fileStat.isDir()) {
          boolean checkFlag = true;
          if (release_pattern != null) {
            // just need to check the files that match the pattern
            Matcher m = release_pattern.matcher(srcPath.toString());
            if (!m.find()) {
              checkFlag = false;
            } 
          }
          if (checkFlag) {
            tmpTimeStamp = fileStat.getModificationTime();
          } else {
            continue;
          }
        } else {
          tmpTimeStamp = getLastTimeStamp(srcPath);
        }
        if (tmpTimeStamp > lastTimeStamp) {
          lastTimeStamp = tmpTimeStamp;
        }
      }
    } catch (IOException ioe) {
      LOG.error("IOException when checking timestamp ", ioe);
    }
    return lastTimeStamp;
  }
455063
@SuppressWarnings("ShortCircuitBoolean")
  boolean hasExpired(Node<K, V> node, long now) {
    return (expiresAfterAccess() && (now - node.getAccessTime() >= expiresAfterAccessNanos()))
        | (expiresAfterWrite() && (now - node.getWriteTime() >= expiresAfterWriteNanos()))
        | (expiresVariable() && (now - node.getVariableTime() >= 0));
  }
596171
public T get() {
    long expiration = whenItExpires;
    long now = System.nanoTime();

    // if uninitialized or expired update value
    if (expiration == 0 || now >= expiration) {
      synchronized (this) {
        // ensure a different thread didn't update it
        if (whenItExpires == expiration) {
          whenItExpires = now + durationNanos;
          try {
            value = getter.call();
          } catch (Exception e) {
            // shouldn't happen
            throw Throwables.propagate(e);
          }
        }
      }
    }
    return value;
  }
1148666
public void valueHasChanged(DCache cache, Object id, long expirationTime, int inactivity) {  // CPF-Inactivity
        //final String methodName = "valueHasChanged()";
        if (expirationTime <= 0 && inactivity <=0 ) { // CPF-Inactivity
            throw new IllegalArgumentException("expirationTime or inactivity must be positive");
        }
        if ( UNIT_TEST_INACTIVITY ) {
            System.out.println(" valueHasChanged() - entry");
            System.out.println(" expirationTime="+expirationTime);
            System.out.println(" inactivity="+inactivity);
        }
        // CPF-Inactivity
        //-----------------------------------------------------------
        // Force an expriationTime if we have an inactivity timer
        //-----------------------------------------------------------
        boolean isInactivityTimeOut = false;
        if ( inactivity > 0 ) {
            // For 7.0, use QuickApproxTime.getRef.getApproxTime()
            long adjustedExpirationTime = System.currentTimeMillis() + ( inactivity * 1000 );
            if ( adjustedExpirationTime < expirationTime ||
                 expirationTime <= 0 ) {
                expirationTime = adjustedExpirationTime;
                isInactivityTimeOut = true;
            }
        }
        ExpirationMetaData expirationMetaData = (ExpirationMetaData)cacheInstancesTable.get(cache);
        // Just make sure expirationMetaData is NOT NULL in case of an internal-error condition
        if (expirationMetaData == null) {
            return;
        }
        synchronized (expirationMetaData) {
            InvalidationTask it = (InvalidationTask) expirationMetaData.expirationTable.get(id);
            if (it == null) {
                it = (InvalidationTask) taskPool.remove();
                it.id = id;
                expirationMetaData.expirationTable.put(id, it);
            } else {
                expirationMetaData.timeLimitHeap.delete(it);
            }
            it.expirationTime = expirationTime;
            it.isInactivityTimeOut = isInactivityTimeOut;
            expirationMetaData.timeLimitHeap.insert(it);
            //ccount++;
            //traceDebug(methodName, "cacheName=" + cache.getCacheName() + " id=" + id + " expirationTableSize=" + expirationMetaData.expirationTable.size() + " timeLimitHeapSize=" + expirationMetaData.timeLimitHeap.size() + " count=" + ccount);
        }
    }