public boolean exceededTimeout(long renderTime, PortletWindow window) { if (!isEnabled()) { return false; } RenderTrackable trackInfo = (RenderTrackable)window; long defaultTimeout = this.getDefaultPortletTimeout(); if (trackInfo.getExpiration() > 0) { return (renderTime > trackInfo.getExpiration()); } else if (defaultTimeout > 0) { return (renderTime > defaultTimeout); } return false; }
public void setExpiration(PortletWindow window, long expiration) { RenderTrackable trackable = (RenderTrackable)window; trackable.setExpiration(expiration); // * 1000); }
public void putIntoService(PortletWindow window) { RenderTrackable trackable = (RenderTrackable)window; removeFromCache(window); trackingCounts.remove(window.getWindowId()); trackable.setRenderTimeoutCount(0); }
public void success(PortletWindow window) { if (!isEnabled()) { return ; } RenderTrackable trackable = (RenderTrackable)window; removeFromCache(window); trackingCounts.remove(window.getWindowId()); trackable.success(); }
public void incrementRenderTimeoutCount(PortletWindow window) { if (!isEnabled()) { return; } RenderTrackable trackable = (RenderTrackable)window; trackable.incrementRenderTimeoutCount(); Integer count = trackingCounts.get(window.getWindowId()); if (count == null) { trackingCounts.put(window.getWindowId(), 1); } else { count = count + 1; trackingCounts.put(window.getWindowId(), count); } }
if (trackable.getRenderTimeoutCount() >= this.outOfServiceLimit)
public void takeOutOfService(PortletWindow window) { RenderTrackable trackable = (RenderTrackable)window; addToCache(window); trackingCounts.remove(window.getWindowId()); trackable.setRenderTimeoutCount((int)this.defaultPortletTimeout + 1); }