|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.datanucleus.store.connection.AbstractManagedConnection
public abstract class AbstractManagedConnection
Abstract implementation of a managed connection.
| Field Summary | |
|---|---|
protected java.lang.Object |
conn
The underlying Connection. |
protected java.util.List<ManagedConnectionResourceListener> |
listeners
|
protected boolean |
locked
|
protected boolean |
managed
if managed by TransactionManager can reuse several times inside the same transaction. |
| Constructor Summary | |
|---|---|
AbstractManagedConnection()
|
|
| Method Summary | |
|---|---|
void |
addListener(ManagedConnectionResourceListener listener)
Registers a ManagedConnectionResourceListener |
void |
flush()
Flush the connection. |
boolean |
isLocked()
whether access to this ManagedConnection has been locked. |
void |
lock()
lock the access to this ManagedConnection |
void |
release()
Release this connection. |
void |
removeListener(ManagedConnectionResourceListener listener)
Deregister a ManagedConnectionResourceListener |
void |
setManagedResource()
Whether this connection is managed by a transaction manager |
java.lang.String |
toString()
|
void |
unlock()
unlock the access to this ManagedConnection |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.datanucleus.store.connection.ManagedConnection |
|---|
close, getConnection, getXAResource |
| Field Detail |
|---|
protected java.lang.Object conn
protected boolean managed
protected boolean locked
protected java.util.List<ManagedConnectionResourceListener> listeners
| Constructor Detail |
|---|
public AbstractManagedConnection()
| Method Detail |
|---|
public void release()
release in interface ManagedConnectionpublic void setManagedResource()
ManagedConnection
setManagedResource in interface ManagedConnectionpublic void addListener(ManagedConnectionResourceListener listener)
ManagedConnection
addListener in interface ManagedConnectionlistener - The listenerpublic void removeListener(ManagedConnectionResourceListener listener)
ManagedConnection
removeListener in interface ManagedConnectionlistener - The listenerpublic void flush()
ManagedConnectionManagedConnectionResourceListener.managedConnectionFlushed()
flush in interface ManagedConnectionpublic boolean isLocked()
ManagedConnection
isLocked in interface ManagedConnectionpublic void lock()
ManagedConnection
lock in interface ManagedConnectionpublic void unlock()
ManagedConnection
unlock in interface ManagedConnectionpublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||