db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r476353 - in /db/derby/code/trunk/java/engine/org/apache/derby: iapi/sql/conn/LanguageConnectionContext.java impl/sql/conn/GenericLanguageConnectionContext.java impl/sql/conn/GenericStatementContext.java
Date Fri, 17 Nov 2006 23:02:31 GMT
Author: djd
Date: Fri Nov 17 15:02:30 2006
New Revision: 476353

URL: http://svn.apache.org/viewvc?view=rev&rev=476353
Log:
Remove some unused methods from LanguageConnectionContext,
anyoneBlocked,getAccessFactory,setTransaction

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/conn/LanguageConnectionContext.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/conn/GenericLanguageConnectionContext.java
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/conn/GenericStatementContext.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/conn/LanguageConnectionContext.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/conn/LanguageConnectionContext.java?view=diff&rev=476353&r1=476352&r2=476353
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/conn/LanguageConnectionContext.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/sql/conn/LanguageConnectionContext.java
Fri Nov 17 15:02:30 2006
@@ -355,20 +355,6 @@
 	void	languageSetSavePoint( String savepointName, Object kindOfSavepoint )  throws StandardException;
 
 	/**
-		Returns true if any transaction is blocked (even if not by this one)
-
-	 */
-	boolean anyoneBlocked();
-
-	/**
-		Sets the transaction controller to use with this language connection
-		context.
-
-		@param	tran	the transaction to use with this language connection context
-	 */
-	void setTransaction( TransactionController tran );
-
-	/**
 	 * Begin a nested transaction.
 	 *
 	 * @param readOnly The nested transaction would be read only if param value true
@@ -865,9 +851,6 @@
 	 *	Get the current StatementContext.
 	 */
 	StatementContext getStatementContext();
-
-	/** Get the AccessFactory cached in this LanguageConnectionContext */
-	AccessFactory getAccessFactory();
 
     /**
 	 * Return a PreparedStatement object for the query.

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/conn/GenericLanguageConnectionContext.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/conn/GenericLanguageConnectionContext.java?view=diff&rev=476353&r1=476352&r2=476353
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/conn/GenericLanguageConnectionContext.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/conn/GenericLanguageConnectionContext.java
Fri Nov 17 15:02:30 2006
@@ -151,12 +151,12 @@
 	that the various language code can find out what its
 	transaction is.
 	**/
-	protected TransactionController tran;
+	private final TransactionController tran;
 
 	/**
 	 * If non-null indicates that a nested user transaction is in progress.
 	 */
-	protected TransactionController childTransaction;
+	private TransactionController childTransaction;
 	
 	/**
 	 * queryNestingDepth is a counter used to keep track of how many calls 
@@ -235,8 +235,6 @@
 	private Vector triggerExecutionContexts;
 	private Vector triggerTables;
 
-	protected AccessFactory af;
-
 	// OptimizerTrace
 	private boolean optimizerTrace;
 	private boolean optimizerTraceHtml;
@@ -317,7 +315,6 @@
 		triggerExecutionContexts = new Vector();
 		triggerTables = new Vector();
 		
-		af = lcf.getAccessFactory();
 		statementCache = lcf.getStatementCache();
 	}
 
@@ -1448,24 +1445,6 @@
 	}
 
 	/**
-	 * Return true if any transaction is blocked, even if not by this one
-	 *
-	 */
-	public boolean anyoneBlocked()
-	{
-		return getTransactionExecute().anyoneBlocked();
-	}
-
-	/**
-		Sets the transaction controller to use with this language connection
-		context.
-
-		@param	tran	the transaction to use with this language connection context
-	 */
-	public void setTransaction( TransactionController tran ) { this.tran = tran; }
-
-
-	/**
 	 * Start a Nested User Transaction (NUT) with the store. If a NUT is 
 	 * already active simply increment a counter, queryNestingDepth, to keep
 	 * track of how many times we have tried to start a NUT.
@@ -1946,7 +1925,7 @@
 		*/
 		if (statementContext == null)
 		{
-			statementContext = statementContexts[0] = new GenericStatementContext(this, tran);
+			statementContext = statementContexts[0] = new GenericStatementContext(this);
 		}
 		else if (statementDepth > 0)
 		{
@@ -1960,7 +1939,7 @@
 				statementContext = statementContexts[1];
 
 				if (statementContext == null)
-					statementContext = statementContexts[1] = new GenericStatementContext(this, tran);
+					statementContext = statementContexts[1] = new GenericStatementContext(this);
 				else
 					statementContext.pushMe();
 
@@ -1969,7 +1948,7 @@
 			else
 			{
 				parentStatementContext = getStatementContext();
-				statementContext = new GenericStatementContext(this, tran);
+				statementContext = new GenericStatementContext(this);
 			}
 
 			inTrigger = parentStatementContext.inTrigger() || (outermostTrigger == parentStatementDepth);
@@ -2902,12 +2881,6 @@
 	public Authorizer getAuthorizer()
 	{
 		return authorizer;
-	}
-
-	/** @see LanguageConnectionContext#getAccessFactory */
-	public AccessFactory getAccessFactory()
-	{
-		return af;
 	}
 
 	/**

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/conn/GenericStatementContext.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/conn/GenericStatementContext.java?view=diff&rev=476353&r1=476352&r2=476353
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/conn/GenericStatementContext.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/conn/GenericStatementContext.java
Fri Nov 17 15:02:30 2006
@@ -64,8 +64,6 @@
 final class GenericStatementContext 
 	extends ContextImpl implements StatementContext
 {
-	private final TransactionController tc;
-
 	private boolean		setSavePoint;
 	private String		internalSavePointName;
 	private ResultSet	topResultSet;
@@ -103,11 +101,10 @@
 	   constructor
 		@param tc transaction
 	*/
-	GenericStatementContext(LanguageConnectionContext lcc, TransactionController tc) 
+	GenericStatementContext(LanguageConnectionContext lcc) 
 	{
 		super(lcc.getContextManager(), org.apache.derby.iapi.reference.ContextId.LANG_STATEMENT);
 		this.lcc = lcc;
-		this.tc = tc;
 
 		internalSavePointName = "ISSP" + hashCode();
 
@@ -254,8 +251,7 @@
 		pleaseBeOnStack();
 		
 
-		// RESOLVE PLUGIN ???. For the plugin, there will be no transaction controller
-		if ( tc != null ) { tc.setSavePoint(internalSavePointName, null); }
+		lcc.getTransactionExecute().setSavePoint(internalSavePointName, null);
 		setSavePoint = true;
 	}
 
@@ -281,7 +277,7 @@
 		if (inUse && setSavePoint)
 		{		
 			// RESOLVE PLUGIN ???. For the plugin, there will be no transaction controller
-			if ( tc != null ) { tc.setSavePoint(internalSavePointName, null); }
+			lcc.getTransactionExecute().setSavePoint(internalSavePointName, null);
 			// stage buffer management
 		}
 	}
@@ -309,7 +305,7 @@
 		}
 
 		// RESOLVE PLUGIN ???. For the plugin, there will be no transaction controller
-		if ( tc != null ) { tc.releaseSavePoint(internalSavePointName, null); }
+		lcc.getTransactionExecute().releaseSavePoint(internalSavePointName, null);
 		setSavePoint = false;
 	}
 



Mime
View raw message