Package org.jboss.jca.adapters.jdbc
Class PreparedStatementCache
java.lang.Object
org.jboss.jca.adapters.jdbc.PreparedStatementCache
- All Implemented Interfaces:
CacheListener<CachedPreparedStatement>
public class PreparedStatementCache
extends Object
implements CacheListener<CachedPreparedStatement>
Cache for PreparedStatements. When ps ages out, close it.
- Author:
- Jesper Pedersen
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGetvoidonEviction(CachedPreparedStatement evicted) On evictionvoidput(PreparedStatementCache.Key key, CachedPreparedStatement value) Putintsize()SizetoString()
-
Constructor Details
-
PreparedStatementCache
Constructor- Parameters:
max- The max valuestats- The statistics plugin
-
-
Method Details
-
get
Get- Parameters:
key- The key- Returns:
- The value
-
put
Put- Parameters:
key- The keyvalue- The value
-
size
public int size()Size- Returns:
- The size
-
onEviction
On eviction- Specified by:
onEvictionin interfaceCacheListener<CachedPreparedStatement>- Parameters:
evicted- The value being evicted
-
toString
-