/** * @see java.io.OutputStream#flush() */ @Override public void flush() throws IOException { if (LOG.isDebugEnabled()) { LOG.debug(Messages.get().getBundle().key(Messages.LOG_FLEXRESPONSE_FLUSHED_1, m_servletStream)); } if (m_servletStream != null) { m_servletStream.flush(); } }
/** * @see java.io.OutputStream#flush() */ @Override public void flush() throws IOException { if (LOG.isDebugEnabled()) { LOG.debug(Messages.get().getBundle().key(Messages.LOG_FLEXRESPONSE_FLUSHED_1, m_servletStream)); } if (m_servletStream != null) { m_servletStream.flush(); } }
/** * @see org.opencms.cache.I_CmsLruCacheObject#removeFromLruCache() */ public void removeFromLruCache() { if ((m_variationMap != null) && (m_variationKey != null)) { m_variationMap.remove(m_variationKey); } if (LOG.isDebugEnabled()) { LOG.debug(Messages.get().getBundle().key( Messages.LOG_FLEXCACHEENTRY_REMOVED_ENTRY_FOR_VARIATION_1, m_variationKey)); } }
/** * @see org.opencms.cache.I_CmsLruCacheObject#addToLruCache() */ public void addToLruCache() { // do nothing here... if (LOG.isDebugEnabled()) { LOG.debug(Messages.get().getBundle().key(Messages.LOG_FLEXCACHEENTRY_ADDED_ENTRY_1, this)); } }
/** * @see org.opencms.cache.I_CmsLruCacheObject#addToLruCache() */ public void addToLruCache() { // do nothing here... if (LOG.isDebugEnabled()) { LOG.debug(Messages.get().getBundle().key(Messages.LOG_FLEXCACHEENTRY_ADDED_ENTRY_1, this)); } }
/** * @see org.opencms.cache.I_CmsLruCacheObject#removeFromLruCache() */ public void removeFromLruCache() { if ((m_variationMap != null) && (m_variationKey != null)) { m_variationMap.remove(m_variationKey); } if (LOG.isDebugEnabled()) { LOG.debug( Messages.get().getBundle().key( Messages.LOG_FLEXCACHEENTRY_REMOVED_ENTRY_FOR_VARIATION_1, m_variationKey)); } }
/** * Sets the expiration date of this Flex cache entry exactly to the * given time.<p> * * @param dateExpires the time to expire this cache entry */ public void setDateExpires(long dateExpires) { m_dateExpires = dateExpires; if (LOG.isDebugEnabled()) { long now = System.currentTimeMillis(); LOG.debug( Messages.get().getBundle().key( Messages.LOG_FLEXCACHEENTRY_SET_EXPIRATION_DATE_3, new Long(m_dateExpires), new Long(now), new Long(m_dateExpires - now))); } }
/** * Sets the expiration date of this Flex cache entry exactly to the * given time.<p> * * @param dateExpires the time to expire this cache entry */ public void setDateExpires(long dateExpires) { m_dateExpires = dateExpires; if (LOG.isDebugEnabled()) { long now = System.currentTimeMillis(); LOG.debug(Messages.get().getBundle().key( Messages.LOG_FLEXCACHEENTRY_SET_EXPIRATION_DATE_3, new Long(m_dateExpires), new Long(now), new Long(m_dateExpires - now))); } }
/** * Empties the cache completely.<p> */ private synchronized void clear() { if (!isEnabled()) { return; } m_keyCache.clear(); m_size = 0; m_variationCache.clear(); if (LOG.isInfoEnabled()) { LOG.info(Messages.get().getBundle().key(Messages.LOG_FLEXCACHE_CLEAR_0)); } }
/** * Emptys the cache completely.<p> */ private synchronized void clear() { if (!isEnabled()) { return; } m_keyCache.clear(); m_size = 0; m_variationCache.clear(); if (LOG.isInfoEnabled()) { LOG.info(Messages.get().getBundle().key(Messages.LOG_FLEXCACHE_CLEAR_0)); } }
/** * Method overload from the standard HttpServletRequest API.<p> * * @see javax.servlet.ServletResponse#setContentType(java.lang.String) */ @Override public void setContentType(String type) { if (LOG.isDebugEnabled()) { LOG.debug(Messages.get().getBundle().key(Messages.LOG_FLEXRESPONSE_SETTING_CONTENTTYPE_1, type)); } // only if this is the "Top-Level" element, do set the content type // otherwise an included JSP could reset the type with some unwanted defaults if (!m_typeSet && m_isTopElement) { // type must be set only once, otherwise some Servlet containers (not Tomcat) generate errors m_typeSet = true; super.setContentType(type); return; } }
/** * Method overload from the standard HttpServletRequest API.<p> * * @see javax.servlet.ServletResponse#setContentType(java.lang.String) */ @Override public void setContentType(String type) { if (LOG.isDebugEnabled()) { LOG.debug(Messages.get().getBundle().key(Messages.LOG_FLEXRESPONSE_SETTING_CONTENTTYPE_1, type)); } // only if this is the "Top-Level" element, do set the content type // otherwise an included JSP could reset the type with some unwanted defaults if (!m_typeSet && m_isTopElement) { // type must be set only once, otherwise some Servlet containers (not Tomcat) generate errors m_typeSet = true; super.setContentType(type); return; } }
/** * Clears all entries from offline projects in the cache.<p> * * The keys from the offline projects are not cleared. * Cached resources from the online project are not touched.<p> * * Only users with administrator permissions are allowed * to perform this operation.<p> */ private void clearOfflineEntries() { if (!isEnabled()) { return; } if (LOG.isInfoEnabled()) { LOG.info(Messages.get().getBundle().key(Messages.LOG_FLEXCACHE_CLEAR_OFFLINE_ENTRIES_0)); } clearAccordingToSuffix(CACHE_OFFLINESUFFIX, true); }
/** * Clears all entries from the online project in the cache.<p> * * The keys from the online project are not cleared. * Cached resources from the offline projects are not touched.<p> * * Only users with administrator permissions are allowed * to perform this operation.<p> */ private void clearOnlineEntries() { if (!isEnabled()) { return; } if (LOG.isInfoEnabled()) { LOG.info(Messages.get().getBundle().key(Messages.LOG_FLEXCACHE_CLEAR_ONLINE_ENTRIES_0)); } clearAccordingToSuffix(CACHE_ONLINESUFFIX, true); }
/** * Clears all entries and all keys from the online project in the cache.<p> * * Cached resources from the offline projects are not touched.<p> * * Only users with administrator permissions are allowed * to perform this operation.<p> */ private void clearOnline() { if (!isEnabled()) { return; } if (LOG.isInfoEnabled()) { LOG.info(Messages.get().getBundle().key(Messages.LOG_FLEXCACHE_CLEAR_ONLINE_KEYS_AND_ENTRIES_0)); } clearAccordingToSuffix(CACHE_ONLINESUFFIX, false); }
/** * Clears all entries and all keys from offline projects in the cache.<p> * * Cached resources from the online project are not touched.<p> * * Only users with administrator permissions are allowed * to perform this operation.<p> */ private void clearOffline() { if (!isEnabled()) { return; } if (LOG.isInfoEnabled()) { LOG.info(Messages.get().getBundle().key(Messages.LOG_FLEXCACHE_CLEAR_KEYS_AND_ENTRIES_0)); } clearAccordingToSuffix(CACHE_OFFLINESUFFIX, false); }
/** * Clears all entries and all keys from the online project in the cache.<p> * * Cached resources from the offline projects are not touched.<p> * * Only users with administrator permissions are allowed * to perform this operation.<p> */ private void clearOnline() { if (!isEnabled()) { return; } if (LOG.isInfoEnabled()) { LOG.info(Messages.get().getBundle().key(Messages.LOG_FLEXCACHE_CLEAR_ONLINE_KEYS_AND_ENTRIES_0)); } clearAccordingToSuffix(CACHE_ONLINESUFFIX, false); }
/** * Clears all entries and all keys from offline projects in the cache.<p> * * Cached resources from the online project are not touched.<p> * * Only users with administrator permissions are allowed * to perform this operation.<p> */ private void clearOffline() { if (!isEnabled()) { return; } if (LOG.isInfoEnabled()) { LOG.info(Messages.get().getBundle().key(Messages.LOG_FLEXCACHE_CLEAR_KEYS_AND_ENTRIES_0)); } clearAccordingToSuffix(CACHE_OFFLINESUFFIX, false); }
/** * Clears all entries from the online project in the cache.<p> * * The keys from the online project are not cleared. * Cached resources from the offline projects are not touched.<p> * * Only users with administrator permissions are allowed * to perform this operation.<p> */ private void clearOnlineEntries() { if (!isEnabled()) { return; } if (LOG.isInfoEnabled()) { LOG.info(Messages.get().getBundle().key(Messages.LOG_FLEXCACHE_CLEAR_ONLINE_ENTRIES_0)); } clearAccordingToSuffix(CACHE_ONLINESUFFIX, true); }
/** * Clears all entries from offline projects in the cache.<p> * * The keys from the offline projects are not cleared. * Cached resources from the online project are not touched.<p> * * Only users with administrator permissions are allowed * to perform this operation.<p> */ private void clearOfflineEntries() { if (!isEnabled()) { return; } if (LOG.isInfoEnabled()) { LOG.info(Messages.get().getBundle().key(Messages.LOG_FLEXCACHE_CLEAR_OFFLINE_ENTRIES_0)); } clearAccordingToSuffix(CACHE_OFFLINESUFFIX, true); }