public class DefaultConnectionSource<T, S extends ConnectionSourceSettings> extends java.lang.Object implements ConnectionSource
Abstract implementation of the ConnectionSource interface
| Constructor and description |
|---|
DefaultConnectionSource(java.lang.String name, T source, S settings) |
DefaultConnectionSource(java.lang.String name, T source, S settings, boolean closeable)Creates a connection source, optionally taking ownership of the underlying source. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
public void |
close() |
|
public java.lang.String |
getName() |
|
public S |
getSettings() |
|
public T |
getSource() |
|
public boolean |
isCloseable() |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#equals(java.lang.Object), java.lang.Object#getClass(), java.lang.Object#hashCode(), java.lang.Object#notify(), java.lang.Object#notifyAll(), java.lang.Object#toString(), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int) |
Creates a connection source, optionally taking ownership of the underlying source.
name - the name of the connection sourcesource - the underlying native source (for example a MongoClient or DataSource)settings - the settingscloseable - whether close() should close the underlying source. Pass
false when the source is externally managed and its lifecycle is owned
by the provider (for example a Spring-managed MongoClient bean), so that
GORM does not close a source it did not create.