public interface ILayer extends Serializable
Collections of ILayer objects and IModule
objects together constitute
the cache metadata encapsulated by an ICache
object. Instances of
this object are serialized, through serialization of the containing
ICache
object, by the cache manager when it periodically saves a
snapshot of the cache metadata to disk. Serialization is actually performed
on clones of the objects in the cache in order to avoid performance
degradation which would be caused by locking of critical sections during file
I/O.
Instances of ILayer are cloneable and serializable.
Modifier and Type | Field and Description |
---|---|
static String |
BUILDFUTURESQUEUE_REQATTRNAME
Name of the request attribute containing the queue of module build
futures.
|
static String |
DEPENDENT_FEATURES
|
static String |
NOCACHE_RESPONSE_REQATTRNAME
Name of request attribute indicating that the response should not be
cached on the browser.
|
static String |
SOURCEMAP_RESOURCE_PATH |
static String |
SOURCEMAP_RESOURCE_PATHCOMP
Path component for source map resources.
|
Modifier and Type | Method and Description |
---|---|
InputStream |
getInputStream(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Returns the
InputStream for the assembled and gzipped layer build
which was generated using the compilation level, has-conditions and
options that are specified in the request. |
String |
getKey()
Returns the cache key that this layer is associated with in the
layer cache.
|
long |
getLastModified(javax.servlet.http.HttpServletRequest request)
Returns the lastModified time of the layer based on the latest last
modified time of each of the component source files.
|
static final String NOCACHE_RESPONSE_REQATTRNAME
static final String BUILDFUTURESQUEUE_REQATTRNAME
IHttpTransport.NOADDMODULES_REQATTRNAME
is true);static final String DEPENDENT_FEATURES
static final String SOURCEMAP_RESOURCE_PATHCOMP
static final String SOURCEMAP_RESOURCE_PATH
InputStream getInputStream(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException
InputStream
for the assembled and gzipped layer build
which was generated using the compilation level, has-conditions and
options that are specified in the request.
Has the side effect of setting the appropriate Content-Length, Content-Type and Content-Encoding headers in the response.
request
- The request objectresponse
- The response objectIOException
long getLastModified(javax.servlet.http.HttpServletRequest request) throws IOException
In production mode, the last modified times of the source files are checked when the layer is initially created and the first time the layer is accessed after a server restart. In development mode, we determine the last modified time of the layer from the last modified times of the component source files on every request.
request
- The http request objectIOException
String getKey()
Copyright © 2011-2015 IBM. All Rights Reserved.