net.sourceforge.jtds.jdbc.cache
Class NonCachingStatementCache
java.lang.Object
|
+--net.sourceforge.jtds.jdbc.cache.NonCachingStatementCache
- All Implemented Interfaces:
- StatementCache
- public class NonCachingStatementCache
- extends java.lang.Object
- implements StatementCache
A caching implementation that performs no caching. This cache implementation
is generally only useful when the driver is not reusing statement handles
as it will save a slight amount of memory and time by not performing any
caching logic.
- Version:
- $Id: NonCachingStatementCache.java,v 1.5 2004/10/26 16:03:10 bheineman Exp $
- Author:
- Brian Heineman
Method Summary |
java.lang.Object |
get(java.lang.String key)
Always returns null for the statement handle, as no caching
is performed. |
java.util.Collection |
getObsoleteHandles(java.util.Collection handles)
Returns the same Collection of statement handles received
as parameter, to ensure the Statement releases all the
handles it has used. |
void |
put(java.lang.String key,
java.lang.Object handle)
Does nothing. |
void |
remove(java.lang.String key)
Does nothing. |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
NonCachingStatementCache
public NonCachingStatementCache()
get
public java.lang.Object get(java.lang.String key)
- Always returns
null
for the statement handle, as no caching
is performed.
- Specified by:
get
in interface StatementCache
- Parameters:
key
- the statement key whose associated handle is to be returned- Returns:
- statement handle
put
public void put(java.lang.String key,
java.lang.Object handle)
- Does nothing.
- Specified by:
put
in interface StatementCache
- Parameters:
key
- the statement key to associated with the handlehandle
- the statement handle.
remove
public void remove(java.lang.String key)
- Does nothing.
- Specified by:
remove
in interface StatementCache
- Parameters:
key
- the statement key whose associated handle is to be removed
from the cache
getObsoleteHandles
public java.util.Collection getObsoleteHandles(java.util.Collection handles)
- Returns the same
Collection
of statement handles received
as parameter, to ensure the Statement
releases all the
handles it has used.
- Specified by:
getObsoleteHandles
in interface StatementCache
- Parameters:
handles
- the statement handles that are no longer being used- Returns:
- the same
Collection
received as parameter
Generated on April 15 2005