Package org.apache.openjpa.slice.jdbc
Class DistributedConnection
- java.lang.Object
- 
- org.apache.openjpa.slice.jdbc.DistributedConnection
 
- 
- All Implemented Interfaces:
- java.lang.AutoCloseable,- java.sql.Connection,- java.sql.Wrapper
 
 public class DistributedConnection extends java.lang.Object implements java.sql.ConnectionA virtual connection that contains multiple physical connections.- Author:
- Pinaki Poddar
 
- 
- 
Constructor SummaryConstructors Constructor Description DistributedConnection(java.util.List<java.sql.Connection> connections)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidabort(java.util.concurrent.Executor executor)voidclearWarnings()voidclose()voidcommit()booleancontains(java.sql.Connection c)java.sql.ArraycreateArrayOf(java.lang.String arg0, java.lang.Object[] arg1)java.sql.BlobcreateBlob()java.sql.ClobcreateClob()java.sql.NClobcreateNClob()java.sql.SQLXMLcreateSQLXML()java.sql.StatementcreateStatement()java.sql.StatementcreateStatement(int arg0, int arg1)java.sql.StatementcreateStatement(int arg0, int arg1, int arg2)java.sql.StructcreateStruct(java.lang.String arg0, java.lang.Object[] arg1)booleangetAutoCommit()java.lang.StringgetCatalog()java.util.PropertiesgetClientInfo()java.lang.StringgetClientInfo(java.lang.String arg0)intgetHoldability()java.sql.DatabaseMetaDatagetMetaData()intgetNetworkTimeout()java.lang.StringgetSchema()intgetTransactionIsolation()java.util.Map<java.lang.String,java.lang.Class<?>>getTypeMap()java.sql.SQLWarninggetWarnings()booleanisClosed()booleanisReadOnly()booleanisValid(int arg0)booleanisWrapperFor(java.lang.Class<?> iface)java.lang.StringnativeSQL(java.lang.String arg0)java.sql.CallableStatementprepareCall(java.lang.String arg0)java.sql.CallableStatementprepareCall(java.lang.String arg0, int arg1, int arg2)java.sql.CallableStatementprepareCall(java.lang.String arg0, int arg1, int arg2, int arg3)java.sql.PreparedStatementprepareStatement(java.lang.String arg0)java.sql.PreparedStatementprepareStatement(java.lang.String arg0, int arg1)java.sql.PreparedStatementprepareStatement(java.lang.String arg0, int[] arg1)java.sql.PreparedStatementprepareStatement(java.lang.String arg0, int arg1, int arg2)java.sql.PreparedStatementprepareStatement(java.lang.String arg0, int arg1, int arg2, int arg3)java.sql.PreparedStatementprepareStatement(java.lang.String arg0, java.lang.String[] arg1)voidreleaseSavepoint(java.sql.Savepoint arg0)voidrollback()voidrollback(java.sql.Savepoint arg0)voidsetAutoCommit(boolean arg0)voidsetCatalog(java.lang.String arg0)voidsetClientInfo(java.lang.String arg0, java.lang.String arg1)voidsetClientInfo(java.util.Properties arg0)voidsetHoldability(int arg0)voidsetNetworkTimeout(java.util.concurrent.Executor executor, int milliseconds)voidsetReadOnly(boolean arg0)java.sql.SavepointsetSavepoint()java.sql.SavepointsetSavepoint(java.lang.String arg0)voidsetSchema(java.lang.String schema)voidsetTransactionIsolation(int arg0)voidsetTypeMap(java.util.Map<java.lang.String,java.lang.Class<?>> arg0)<T> Tunwrap(java.lang.Class<T> iface)
 
- 
- 
- 
Method Detail- 
containspublic boolean contains(java.sql.Connection c) 
 - 
clearWarningspublic void clearWarnings() throws java.sql.SQLException- Specified by:
- clearWarningsin interface- java.sql.Connection
- Throws:
- java.sql.SQLException
 
 - 
closepublic void close() throws java.sql.SQLException- Specified by:
- closein interface- java.lang.AutoCloseable
- Specified by:
- closein interface- java.sql.Connection
- Throws:
- java.sql.SQLException
 
 - 
commitpublic void commit() throws java.sql.SQLException- Specified by:
- commitin interface- java.sql.Connection
- Throws:
- java.sql.SQLException
 
 - 
createStatementpublic java.sql.Statement createStatement() throws java.sql.SQLException- Specified by:
- createStatementin interface- java.sql.Connection
- Throws:
- java.sql.SQLException
 
 - 
createStatementpublic java.sql.Statement createStatement(int arg0, int arg1) throws java.sql.SQLException- Specified by:
- createStatementin interface- java.sql.Connection
- Throws:
- java.sql.SQLException
 
 - 
createStatementpublic java.sql.Statement createStatement(int arg0, int arg1, int arg2) throws java.sql.SQLException- Specified by:
- createStatementin interface- java.sql.Connection
- Throws:
- java.sql.SQLException
 
 - 
getAutoCommitpublic boolean getAutoCommit() throws java.sql.SQLException- Specified by:
- getAutoCommitin interface- java.sql.Connection
- Throws:
- java.sql.SQLException
 
 - 
getCatalogpublic java.lang.String getCatalog() throws java.sql.SQLException- Specified by:
- getCatalogin interface- java.sql.Connection
- Throws:
- java.sql.SQLException
 
 - 
getHoldabilitypublic int getHoldability() throws java.sql.SQLException- Specified by:
- getHoldabilityin interface- java.sql.Connection
- Throws:
- java.sql.SQLException
 
 - 
getMetaDatapublic java.sql.DatabaseMetaData getMetaData() throws java.sql.SQLException- Specified by:
- getMetaDatain interface- java.sql.Connection
- Throws:
- java.sql.SQLException
 
 - 
getTransactionIsolationpublic int getTransactionIsolation() throws java.sql.SQLException- Specified by:
- getTransactionIsolationin interface- java.sql.Connection
- Throws:
- java.sql.SQLException
 
 - 
getTypeMappublic java.util.Map<java.lang.String,java.lang.Class<?>> getTypeMap() throws java.sql.SQLException- Specified by:
- getTypeMapin interface- java.sql.Connection
- Throws:
- java.sql.SQLException
 
 - 
getWarningspublic java.sql.SQLWarning getWarnings() throws java.sql.SQLException- Specified by:
- getWarningsin interface- java.sql.Connection
- Throws:
- java.sql.SQLException
 
 - 
isClosedpublic boolean isClosed() throws java.sql.SQLException- Specified by:
- isClosedin interface- java.sql.Connection
- Throws:
- java.sql.SQLException
 
 - 
isReadOnlypublic boolean isReadOnly() throws java.sql.SQLException- Specified by:
- isReadOnlyin interface- java.sql.Connection
- Throws:
- java.sql.SQLException
 
 - 
nativeSQLpublic java.lang.String nativeSQL(java.lang.String arg0) throws java.sql.SQLException- Specified by:
- nativeSQLin interface- java.sql.Connection
- Throws:
- java.sql.SQLException
 
 - 
prepareCallpublic java.sql.CallableStatement prepareCall(java.lang.String arg0) throws java.sql.SQLException- Specified by:
- prepareCallin interface- java.sql.Connection
- Throws:
- java.sql.SQLException
 
 - 
prepareCallpublic java.sql.CallableStatement prepareCall(java.lang.String arg0, int arg1, int arg2) throws java.sql.SQLException- Specified by:
- prepareCallin interface- java.sql.Connection
- Throws:
- java.sql.SQLException
 
 - 
prepareCallpublic java.sql.CallableStatement prepareCall(java.lang.String arg0, int arg1, int arg2, int arg3) throws java.sql.SQLException- Specified by:
- prepareCallin interface- java.sql.Connection
- Throws:
- java.sql.SQLException
 
 - 
prepareStatementpublic java.sql.PreparedStatement prepareStatement(java.lang.String arg0) throws java.sql.SQLException- Specified by:
- prepareStatementin interface- java.sql.Connection
- Throws:
- java.sql.SQLException
 
 - 
prepareStatementpublic java.sql.PreparedStatement prepareStatement(java.lang.String arg0, int arg1) throws java.sql.SQLException- Specified by:
- prepareStatementin interface- java.sql.Connection
- Throws:
- java.sql.SQLException
 
 - 
prepareStatementpublic java.sql.PreparedStatement prepareStatement(java.lang.String arg0, int[] arg1) throws java.sql.SQLException- Specified by:
- prepareStatementin interface- java.sql.Connection
- Throws:
- java.sql.SQLException
 
 - 
prepareStatementpublic java.sql.PreparedStatement prepareStatement(java.lang.String arg0, java.lang.String[] arg1) throws java.sql.SQLException- Specified by:
- prepareStatementin interface- java.sql.Connection
- Throws:
- java.sql.SQLException
 
 - 
prepareStatementpublic java.sql.PreparedStatement prepareStatement(java.lang.String arg0, int arg1, int arg2) throws java.sql.SQLException- Specified by:
- prepareStatementin interface- java.sql.Connection
- Throws:
- java.sql.SQLException
 
 - 
prepareStatementpublic java.sql.PreparedStatement prepareStatement(java.lang.String arg0, int arg1, int arg2, int arg3) throws java.sql.SQLException- Specified by:
- prepareStatementin interface- java.sql.Connection
- Throws:
- java.sql.SQLException
 
 - 
releaseSavepointpublic void releaseSavepoint(java.sql.Savepoint arg0) throws java.sql.SQLException- Specified by:
- releaseSavepointin interface- java.sql.Connection
- Throws:
- java.sql.SQLException
 
 - 
rollbackpublic void rollback() throws java.sql.SQLException- Specified by:
- rollbackin interface- java.sql.Connection
- Throws:
- java.sql.SQLException
 
 - 
rollbackpublic void rollback(java.sql.Savepoint arg0) throws java.sql.SQLException- Specified by:
- rollbackin interface- java.sql.Connection
- Throws:
- java.sql.SQLException
 
 - 
setAutoCommitpublic void setAutoCommit(boolean arg0) throws java.sql.SQLException- Specified by:
- setAutoCommitin interface- java.sql.Connection
- Throws:
- java.sql.SQLException
 
 - 
setCatalogpublic void setCatalog(java.lang.String arg0) throws java.sql.SQLException- Specified by:
- setCatalogin interface- java.sql.Connection
- Throws:
- java.sql.SQLException
 
 - 
setHoldabilitypublic void setHoldability(int arg0) throws java.sql.SQLException- Specified by:
- setHoldabilityin interface- java.sql.Connection
- Throws:
- java.sql.SQLException
 
 - 
setReadOnlypublic void setReadOnly(boolean arg0) throws java.sql.SQLException- Specified by:
- setReadOnlyin interface- java.sql.Connection
- Throws:
- java.sql.SQLException
 
 - 
setSavepointpublic java.sql.Savepoint setSavepoint() throws java.sql.SQLException- Specified by:
- setSavepointin interface- java.sql.Connection
- Throws:
- java.sql.SQLException
 
 - 
setSavepointpublic java.sql.Savepoint setSavepoint(java.lang.String arg0) throws java.sql.SQLException- Specified by:
- setSavepointin interface- java.sql.Connection
- Throws:
- java.sql.SQLException
 
 - 
setTransactionIsolationpublic void setTransactionIsolation(int arg0) throws java.sql.SQLException- Specified by:
- setTransactionIsolationin interface- java.sql.Connection
- Throws:
- java.sql.SQLException
 
 - 
setTypeMappublic void setTypeMap(java.util.Map<java.lang.String,java.lang.Class<?>> arg0) throws java.sql.SQLException- Specified by:
- setTypeMapin interface- java.sql.Connection
- Throws:
- java.sql.SQLException
 
 - 
isWrapperForpublic boolean isWrapperFor(java.lang.Class<?> iface) throws java.sql.SQLException- Specified by:
- isWrapperForin interface- java.sql.Wrapper
- Throws:
- java.sql.SQLException
 
 - 
unwrappublic <T> T unwrap(java.lang.Class<T> iface) throws java.sql.SQLException- Specified by:
- unwrapin interface- java.sql.Wrapper
- Throws:
- java.sql.SQLException
 
 - 
createArrayOfpublic java.sql.Array createArrayOf(java.lang.String arg0, java.lang.Object[] arg1) throws java.sql.SQLException- Specified by:
- createArrayOfin interface- java.sql.Connection
- Throws:
- java.sql.SQLException
 
 - 
createBlobpublic java.sql.Blob createBlob() throws java.sql.SQLException- Specified by:
- createBlobin interface- java.sql.Connection
- Throws:
- java.sql.SQLException
 
 - 
createClobpublic java.sql.Clob createClob() throws java.sql.SQLException- Specified by:
- createClobin interface- java.sql.Connection
- Throws:
- java.sql.SQLException
 
 - 
createNClobpublic java.sql.NClob createNClob() throws java.sql.SQLException- Specified by:
- createNClobin interface- java.sql.Connection
- Throws:
- java.sql.SQLException
 
 - 
createSQLXMLpublic java.sql.SQLXML createSQLXML() throws java.sql.SQLException- Specified by:
- createSQLXMLin interface- java.sql.Connection
- Throws:
- java.sql.SQLException
 
 - 
createStructpublic java.sql.Struct createStruct(java.lang.String arg0, java.lang.Object[] arg1) throws java.sql.SQLException- Specified by:
- createStructin interface- java.sql.Connection
- Throws:
- java.sql.SQLException
 
 - 
getClientInfopublic java.util.Properties getClientInfo() throws java.sql.SQLException- Specified by:
- getClientInfoin interface- java.sql.Connection
- Throws:
- java.sql.SQLException
 
 - 
getClientInfopublic java.lang.String getClientInfo(java.lang.String arg0) throws java.sql.SQLException- Specified by:
- getClientInfoin interface- java.sql.Connection
- Throws:
- java.sql.SQLException
 
 - 
isValidpublic boolean isValid(int arg0) throws java.sql.SQLException- Specified by:
- isValidin interface- java.sql.Connection
- Throws:
- java.sql.SQLException
 
 - 
setClientInfopublic void setClientInfo(java.util.Properties arg0) throws java.sql.SQLClientInfoException- Specified by:
- setClientInfoin interface- java.sql.Connection
- Throws:
- java.sql.SQLClientInfoException
 
 - 
setClientInfopublic void setClientInfo(java.lang.String arg0, java.lang.String arg1) throws java.sql.SQLClientInfoException- Specified by:
- setClientInfoin interface- java.sql.Connection
- Throws:
- java.sql.SQLClientInfoException
 
 - 
abortpublic void abort(java.util.concurrent.Executor executor) throws java.sql.SQLException- Specified by:
- abortin interface- java.sql.Connection
- Throws:
- java.sql.SQLException
 
 - 
getNetworkTimeoutpublic int getNetworkTimeout() throws java.sql.SQLException- Specified by:
- getNetworkTimeoutin interface- java.sql.Connection
- Throws:
- java.sql.SQLException
 
 - 
setNetworkTimeoutpublic void setNetworkTimeout(java.util.concurrent.Executor executor, int milliseconds) throws java.sql.SQLException- Specified by:
- setNetworkTimeoutin interface- java.sql.Connection
- Throws:
- java.sql.SQLException
 
 - 
getSchemapublic java.lang.String getSchema() throws java.sql.SQLException- Specified by:
- getSchemain interface- java.sql.Connection
- Throws:
- java.sql.SQLException
 
 - 
setSchemapublic void setSchema(java.lang.String schema) throws java.sql.SQLException- Specified by:
- setSchemain interface- java.sql.Connection
- Throws:
- java.sql.SQLException
 
 
- 
 
-