com.sun.grizzly.connectioncache.client
Class CacheableConnectorHandlerPool

java.lang.Object
  extended by com.sun.grizzly.connectioncache.client.CacheableConnectorHandlerPool
All Implemented Interfaces:
ConnectorHandlerPool<CacheableConnectorHandler>

public class CacheableConnectorHandlerPool
extends Object
implements ConnectorHandlerPool<CacheableConnectorHandler>

ConnectorInstanceHandler which use a ConcurrentQueue to pool CacheableConnectorHandler

Author:
Alexey Stashok

Constructor Summary
CacheableConnectorHandlerPool(Controller controller, int highWaterMark, int numberToReclaim, int maxParallel)
           
CacheableConnectorHandlerPool(Controller controller, int highWaterMark, int numberToReclaim, int maxParallel, ConnectionFinder<ConnectorHandler> connectionFinder)
           
 
Method Summary
 CacheableConnectorHandler acquireConnectorHandler(Controller.Protocol protocol)
          Return an instance of ConnectorHandler, which corresponds to the protocol
 void releaseConnectorHandler(CacheableConnectorHandler connectorHandler)
          Release a ConnectorHandler.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CacheableConnectorHandlerPool

public CacheableConnectorHandlerPool(Controller controller,
                                     int highWaterMark,
                                     int numberToReclaim,
                                     int maxParallel)

CacheableConnectorHandlerPool

public CacheableConnectorHandlerPool(Controller controller,
                                     int highWaterMark,
                                     int numberToReclaim,
                                     int maxParallel,
                                     ConnectionFinder<ConnectorHandler> connectionFinder)
Method Detail

acquireConnectorHandler

public CacheableConnectorHandler acquireConnectorHandler(Controller.Protocol protocol)
Description copied from interface: ConnectorHandlerPool
Return an instance of ConnectorHandler, which corresponds to the protocol

Specified by:
acquireConnectorHandler in interface ConnectorHandlerPool<CacheableConnectorHandler>
Parameters:
protocol - a Protocol
Returns:
ConnectorHandler

releaseConnectorHandler

public void releaseConnectorHandler(CacheableConnectorHandler connectorHandler)
Description copied from interface: ConnectorHandlerPool
Release a ConnectorHandler.

Specified by:
releaseConnectorHandler in interface ConnectorHandlerPool<CacheableConnectorHandler>
Parameters:
connectorHandler - - a ConnectorHandler


Copyright © 2011 SUN Microsystems. All Rights Reserved.