org.jboss.jca.adapters.jdbc
Class PreparedStatementCache

java.lang.Object
  extended by org.jboss.jca.adapters.jdbc.PreparedStatementCache

public class PreparedStatementCache
extends Object

Cache for PreparedStatements. When ps ages out, close it.

Author:
Jesper Pedersen

Nested Class Summary
static class PreparedStatementCache.Key
          Ket class
 
Constructor Summary
PreparedStatementCache(int max, JdbcStatisticsPlugin stats)
          Constructor
 
Method Summary
 CachedPreparedStatement get(PreparedStatementCache.Key key)
          Get
 void put(PreparedStatementCache.Key key, CachedPreparedStatement value)
          Put
 int size()
          Size
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PreparedStatementCache

public PreparedStatementCache(int max,
                              JdbcStatisticsPlugin stats)
Constructor

Parameters:
max - The max value
stats - The statistics plugin
Method Detail

get

public CachedPreparedStatement get(PreparedStatementCache.Key key)
Get

Parameters:
key - The key
Returns:
The value

put

public void put(PreparedStatementCache.Key key,
                CachedPreparedStatement value)
Put

Parameters:
key - The key
value - The value

size

public int size()
Size

Returns:
The size

toString

public String toString()

Overrides:
toString in class Object


Copyright © 2008 Red Hat Middleware LLC (http://www.jboss.com/)