| |
|
| java.lang.Object org.apache.catalina.valves.ValveBase org.apache.catalina.valves.SemaphoreValve
SemaphoreValve | public class SemaphoreValve extends ValveBase implements Lifecycle(Code) | | Implementation of a Valve that limits concurrency.
This Valve may be attached to any Container, depending on the granularity
of the concurrency control you wish to perform.
author: Remy Maucherat version: $Revision: 467222 $ $Date: 2006-10-24 05:17:11 +0200 (mar., 24 oct. 2006) $ |
block | protected boolean block(Code) | | Block until a permit is available.
|
concurrency | protected int concurrency(Code) | | Concurrency level of the semaphore.
|
fairness | protected boolean fairness(Code) | | Fairness of the semaphore.
|
interruptible | protected boolean interruptible(Code) | | Block interruptibly until a permit is available.
|
addLifecycleListener | public void addLifecycleListener(LifecycleListener listener)(Code) | | Add a lifecycle event listener to this component.
Parameters: listener - The listener to add |
controlConcurrency | public boolean controlConcurrency(Request request, Response response)(Code) | | Subclass friendly method to add conditions.
|
findLifecycleListeners | public LifecycleListener[] findLifecycleListeners()(Code) | | Get the lifecycle listeners associated with this lifecycle. If this
Lifecycle has no listeners registered, a zero-length array is returned.
|
getBlock | public boolean getBlock()(Code) | | |
getConcurrency | public int getConcurrency()(Code) | | |
getFairness | public boolean getFairness()(Code) | | |
getInfo | public String getInfo()(Code) | | Return descriptive information about this Valve implementation.
|
getInterruptible | public boolean getInterruptible()(Code) | | |
invoke | public void invoke(Request request, Response response) throws IOException, ServletException(Code) | | Do concurrency control on the request using the semaphore.
Parameters: request - The servlet request to be processed Parameters: response - The servlet response to be created exception: IOException - if an input/output error occurs exception: ServletException - if a servlet error occurs |
removeLifecycleListener | public void removeLifecycleListener(LifecycleListener listener)(Code) | | Remove a lifecycle event listener from this component.
Parameters: listener - The listener to add |
setBlock | public void setBlock(boolean block)(Code) | | |
setConcurrency | public void setConcurrency(int concurrency)(Code) | | |
setFairness | public void setFairness(boolean fairness)(Code) | | |
setInterruptible | public void setInterruptible(boolean interruptible)(Code) | | |
start | public void start() throws LifecycleException(Code) | | Prepare for the beginning of active use of the public methods of this
component. This method should be called after configure() ,
and before any of the public methods of the component are utilized.
exception: LifecycleException - if this component detects a fatal errorthat prevents this component from being used |
stop | public void stop() throws LifecycleException(Code) | | Gracefully terminate the active use of the public methods of this
component. This method should be the last one called on a given
instance of this component.
exception: LifecycleException - if this component detects a fatal errorthat needs to be reported |
|
|
|