org.restlet.engine.connector
Class ConnectionPool<T extends Connector>
java.lang.Object
org.restlet.engine.util.Pool<Connection<T>>
org.restlet.engine.connector.ConnectionPool<T>
public class ConnectionPool<T extends Connector>
- extends Pool<Connection<T>>
A connection pool to prevent to recreation of heavy byte buffers.
- Author:
- Jerome Louvel
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConnectionPool
public ConnectionPool(ConnectionHelper<T> helper,
int initialSize)
- Constructor.
- Parameters:
helper
- The parent helper.initialSize
- The initial pool size.
clear
protected void clear(Connection<T> connection)
- Description copied from class:
Pool
- Clears the given object when it is checked in the pool. Does nothing by
default.
- Overrides:
clear
in class Pool<Connection<T extends Connector>>
- Parameters:
connection
- The object to clear.
createObject
protected Connection<T> createObject()
- Description copied from class:
Pool
- Creates a new reusable object.
- Specified by:
createObject
in class Pool<Connection<T extends Connector>>
- Returns:
- A new reusable object.
Copyright © 2005-2013 Restlet.