org.apache.jetspeed.aggregator.impl
Class PortletTrackingManagerImpl

java.lang.Object
  extended by org.apache.jetspeed.aggregator.impl.PortletTrackingManagerImpl
All Implemented Interfaces:
PortletTrackingManager

public class PortletTrackingManagerImpl
extends java.lang.Object
implements PortletTrackingManager

Tracks out of service status for portlets

Version:
$Id: $
Author:
David Sean Taylor

Field Summary
protected  long defaultPortletTimeout
          when rendering a portlet, the default timeout period in milliseconds setting to zero will disable (no timeout) the timeout
protected  java.util.Map outOfService
           
protected  int outOfServiceLimit
          Out of service limit, if a portlet entity times out past its limit (or default limit) n consecutive times, it is taken out of service
protected  PortletWindowAccessor windowAccessor
           
 
Constructor Summary
PortletTrackingManagerImpl(PortletWindowAccessor windowAccessor, long defaultPortletTimeout, int outOfServiceLimit)
           
 
Method Summary
 boolean exceededTimeout(long renderTime, org.apache.pluto.om.window.PortletWindow window)
           
 long getDefaultPortletTimeout()
          Get the default timeout for rendering a portlet in milliseconds
 int getOutOfServiceLimit()
          Out of service limit, if a portlet entity times out past its limit (or default limit) n consecutive times, it is taken out of service
 java.util.List getOutOfServiceList()
           
 java.util.List getOutOfServiceList(java.lang.String fullPortletName)
           
 void incrementRenderTimeoutCount(org.apache.pluto.om.window.PortletWindow window)
           
 boolean isOutOfService(org.apache.pluto.om.window.PortletWindow window)
           
 void putIntoService(java.util.List fullPortletNames)
           
 void putIntoService(org.apache.pluto.om.window.PortletWindow window)
           
 void setExpiration(org.apache.pluto.om.window.PortletWindow window, long expiration)
           
 void success(org.apache.pluto.om.window.PortletWindow window)
           
 void takeOutOfService(org.apache.pluto.om.window.PortletWindow window)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

outOfService

protected java.util.Map outOfService

defaultPortletTimeout

protected long defaultPortletTimeout
when rendering a portlet, the default timeout period in milliseconds setting to zero will disable (no timeout) the timeout


outOfServiceLimit

protected int outOfServiceLimit
Out of service limit, if a portlet entity times out past its limit (or default limit) n consecutive times, it is taken out of service


windowAccessor

protected PortletWindowAccessor windowAccessor
Constructor Detail

PortletTrackingManagerImpl

public PortletTrackingManagerImpl(PortletWindowAccessor windowAccessor,
                                  long defaultPortletTimeout,
                                  int outOfServiceLimit)
Method Detail

getDefaultPortletTimeout

public long getDefaultPortletTimeout()
Description copied from interface: PortletTrackingManager
Get the default timeout for rendering a portlet in milliseconds

Specified by:
getDefaultPortletTimeout in interface PortletTrackingManager

exceededTimeout

public boolean exceededTimeout(long renderTime,
                               org.apache.pluto.om.window.PortletWindow window)
Specified by:
exceededTimeout in interface PortletTrackingManager

isOutOfService

public boolean isOutOfService(org.apache.pluto.om.window.PortletWindow window)
Specified by:
isOutOfService in interface PortletTrackingManager

getOutOfServiceLimit

public int getOutOfServiceLimit()
Description copied from interface: PortletTrackingManager
Out of service limit, if a portlet entity times out past its limit (or default limit) n consecutive times, it is taken out of service

Specified by:
getOutOfServiceLimit in interface PortletTrackingManager
Returns:

incrementRenderTimeoutCount

public void incrementRenderTimeoutCount(org.apache.pluto.om.window.PortletWindow window)
Specified by:
incrementRenderTimeoutCount in interface PortletTrackingManager

success

public void success(org.apache.pluto.om.window.PortletWindow window)
Specified by:
success in interface PortletTrackingManager

setExpiration

public void setExpiration(org.apache.pluto.om.window.PortletWindow window,
                          long expiration)
Specified by:
setExpiration in interface PortletTrackingManager

takeOutOfService

public void takeOutOfService(org.apache.pluto.om.window.PortletWindow window)
Specified by:
takeOutOfService in interface PortletTrackingManager

putIntoService

public void putIntoService(org.apache.pluto.om.window.PortletWindow window)
Specified by:
putIntoService in interface PortletTrackingManager

putIntoService

public void putIntoService(java.util.List fullPortletNames)
Specified by:
putIntoService in interface PortletTrackingManager
Parameters:
fullPortletNames - a list of Strings of full portlet names

getOutOfServiceList

public java.util.List getOutOfServiceList(java.lang.String fullPortletName)
Specified by:
getOutOfServiceList in interface PortletTrackingManager

getOutOfServiceList

public java.util.List getOutOfServiceList()
Specified by:
getOutOfServiceList in interface PortletTrackingManager


Copyright © 1999-2009 Apache Software Foundation. All Rights Reserved.