public interface IPhynixxManagedConnection<C extends IPhynixxConnection> extends IPhynixxConnection, ICloseable
PhynixxManagedConnectionFactory
this IF combines the role of a core connection and the role of a connection proxy.
Impl. of this IF represents the access to the core connections in this FW
h1. Thread Safeness
When this connection is used in a pool (PooledPhynixxManagedConnectionFactory it is strongly recommend to synchronized
the connection setSynchronized(boolean).
When a connection is get from the pool or if it is released to it some functionality of the connection is used.
It is no obvious if the pools implementation of GenericObjectPool is strictly thread safe.| Modifier and Type | Method and Description |
|---|---|
void |
addConnectionListener(IPhynixxManagedConnectionListener<C> listener) |
void |
commit(boolean onePhaseCommit) |
void |
free()
marks a connection a freed.
|
C |
getCoreConnection() |
long |
getManagedConnectionId() |
boolean |
hasCoreConnection() |
boolean |
hasTransactionalData() |
boolean |
isSynchronized() |
void |
recover() |
void |
removeConnectionListener(IPhynixxManagedConnectionListener<C> listener) |
void |
reopen()
opens a connection that may have been reset.
|
void |
setSynchronized(boolean state)
set the thread safeness of the connection.
|
C |
toConnection() |
close, commit, prepare, reset, rollbackclose, isClosedvoid setSynchronized(boolean state)
state - State of synchronizationboolean isSynchronized()
long getManagedConnectionId()
C getCoreConnection()
boolean hasTransactionalData()
C toConnection()
void free()
boolean hasCoreConnection()
void recover()
void commit(boolean onePhaseCommit)
void reopen()
ICloseable.isClosed()==false and IPhynixxConnection.reset() is called on the physical connection.IllegalStateException - connection has transactional datavoid addConnectionListener(IPhynixxManagedConnectionListener<C> listener)
void removeConnectionListener(IPhynixxManagedConnectionListener<C> listener)
Copyright © 2017. All rights reserved.