public class AtomicConnection
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
AtomicConnection.ConnectionCleanupAction |
| Modifier and Type | Field and Description |
|---|---|
protected java.util.concurrent.atomic.AtomicReference<java.sql.Connection> |
atomicReference |
protected LazyCleaner.Cleanable |
cleanable |
protected AtomicConnection.ConnectionCleanupAction |
cleanupAction |
protected boolean |
logUnclosedConnections |
| Constructor and Description |
|---|
AtomicConnection(java.lang.Object referent) |
AtomicConnection(java.lang.Object referent,
boolean logUnclosedConnections) |
| Modifier and Type | Method and Description |
|---|---|
void |
clean() |
boolean |
compareAndSet(java.sql.Connection expected,
java.sql.Connection updated) |
java.sql.Connection |
get() |
void |
set(java.sql.Connection connection) |
void |
set(java.sql.Connection connection,
boolean closePreviousConnection) |
void |
set(java.sql.Connection connection,
java.lang.Throwable openConnectionStacktrace,
boolean closePreviousConnection) |
protected final java.util.concurrent.atomic.AtomicReference<java.sql.Connection> atomicReference
protected boolean logUnclosedConnections
protected LazyCleaner.Cleanable cleanable
protected AtomicConnection.ConnectionCleanupAction cleanupAction
public AtomicConnection(java.lang.Object referent)
public AtomicConnection(java.lang.Object referent,
boolean logUnclosedConnections)
public void clean()
public java.sql.Connection get()
public void set(java.sql.Connection connection,
boolean closePreviousConnection)
public void set(java.sql.Connection connection)
public void set(java.sql.Connection connection,
java.lang.Throwable openConnectionStacktrace,
boolean closePreviousConnection)
public boolean compareAndSet(java.sql.Connection expected,
java.sql.Connection updated)