public class ConnectionResource extends Resource implements IResource
IResource representing a Connection.| Constructor and Description |
|---|
ConnectionResource(Connection connection,
DataSource dataSource) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Cleans the resource of its contents so it can be returned to the pool.
|
void |
close() |
void |
closeCurrentConnection()
Must be called by the resource owner
|
Connection |
getConnection() |
acquire, isAcquired, isFromPool, release, setAcquired, setFromPoolclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitacquire, isAcquired, isFromPool, release, setAcquired, setFromPoolpublic ConnectionResource(Connection connection, DataSource dataSource)
public void clear()
IResource You may use the
IResource.isFromPool() indication to decide of a special action before returning a resource to
the pool, or discard any actions on resources not returning to the pool.
clear in interface IResourceclear in class ResourceIResource.release()public Connection getConnection()
Connection represented by this ConnectionResourcepublic void closeCurrentConnection()
public void close()
Copyright © GigaSpaces.