Package com.caucho.server.cache

Examples of com.caucho.server.cache.AbstractCacheEntry


    String contentType = null;
    String charEncoding = null;

    int contentLength = -1;

    AbstractCacheEntry cacheEntry
      = cacheInvocation.startCaching(_response.getRequest(), _response,
                                     _headerKeys, _headerValues,
                                     contentType,
                                     charEncoding,
                                     contentLength);
   
    if (cacheEntry == null)
      return;

    cacheEntry.setForwardEnclosed(_response.isForwardEnclosed());

    if (isByte)
      _cacheStream = cacheEntry.openOutputStream();
    else
      _cacheWriter = cacheEntry.openWriter();
  }
View Full Code Here


    String contentType = res.getContentTypeImpl();
    String charEncoding = res.getCharacterEncodingImpl();

    int contentLength = -1;

    AbstractCacheEntry newCacheEntry
      = cacheInvocation.startCaching(req, res,
                                     keys, values,
                                     contentType,
                                     charEncoding,
                                     contentLength);

    if (newCacheEntry == null) {
    }
    else if (isByte) {
      setByteCacheStream(newCacheEntry.openOutputStream());
    }
    else {
      setCharCacheStream(newCacheEntry.openWriter());
    }
  }
View Full Code Here

        cacheStream.close();

      if (cacheWriter != null)
        cacheWriter.close();

      AbstractCacheEntry cacheEntry = _cacheEntry;

      if (cacheEntry != null) {
        _cacheEntry = null;

        if (cache != null)
          cache.finishCaching(cacheEntry);
      }
    } finally {
      // _response.setCacheInvocation(null);

      AbstractCacheEntry cacheEntry = _cacheEntry;
      _cacheEntry = null;

      if (cache != null && cacheEntry != null)
        cache.killCaching(cacheEntry);
    }
View Full Code Here

    String contentType = res.getContentTypeImpl();
    String charEncoding = res.getCharacterEncodingImpl();

    int contentLength = -1;

    AbstractCacheEntry newCacheEntry
      = cacheInvocation.startCaching(req, res,
                                     keys, values,
                                     contentType,
                                     charEncoding,
                                     contentLength);

    if (newCacheEntry == null) {
    }
    else if (isByte) {
      _newCacheEntry = newCacheEntry;

      setByteCacheStream(newCacheEntry.openOutputStream());
    }
    else {
      _newCacheEntry = newCacheEntry;

      setCharCacheStream(newCacheEntry.openWriter());
    }
  }
View Full Code Here

  }

  @Override
  public void killCaching()
  {
    AbstractCacheEntry cacheEntry = _newCacheEntry;
    _newCacheEntry = null;

    if (cacheEntry != null) {
      _cacheInvocation.killCaching(cacheEntry);
      setByteCacheStream(null);
View Full Code Here

        if (request == null)
          return;

        WebApp webApp = request.getWebApp();
        if (webApp != null && webApp.isActive()) {
          AbstractCacheEntry cacheEntry = _newCacheEntry;

          _cacheInvocation.finishCaching(cacheEntry);

          _newCacheEntry = null;
        }
      }
    } finally {
      AbstractCacheFilterChain cache = _cacheInvocation;
      _cacheInvocation = null;

      AbstractCacheEntry cacheEntry = _newCacheEntry;
      _newCacheEntry = null;

      if (cache != null && cacheEntry != null)
        cache.killCaching(cacheEntry);
    }
View Full Code Here

TOP

Related Classes of com.caucho.server.cache.AbstractCacheEntry

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.