⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dependencymanager.java

📁 derby database source code.good for you.
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
	<pre>		in DropTable:			scan the TableAuthority table looking for authorities on		this table; drop any that are found.			scan the ColumnAuthority table looking for authorities on		this table; drop any that are found.			scan the View table looking for views on		this table; drop any that are found.			scan the Column table looking for rows for columns of		this table; drop any that are found.			scan the Constraint table looking for rows for constraints of		this table; drop any that are found.			scan the Index table looking for rows for indexes of		this table; drop the indexes, and any rows that are found.		drop the table's conglomerate		drop the table's row in the Table table.		</pre>	<p>	The direct approach such as that outlined in the example will	probably be quicker and is definitely "known technology" over	the use of a dependency system in this area. */public interface DependencyManager {	/* NOTE - every value in this group (actions) must have a matching	 * String in the implementation of getActionString().	 */	public static final int COMPILE_FAILED = 0;	public static final int DROP_TABLE = 1;	public static final int DROP_INDEX = 2;	public static final int CREATE_INDEX = 3;	public static final int ROLLBACK = 4;	public static final int CHANGED_CURSOR = 5;	public static final int DROP_METHOD_ALIAS = 6;	public static final int DROP_VIEW = 9;	public static final int CREATE_VIEW = 10;	public static final int PREPARED_STATEMENT_RELEASE = 11;	public static final int ALTER_TABLE = 12;	public static final int DROP_SPS = 13;	public static final int USER_RECOMPILE_REQUEST = 14; 	public static final int BULK_INSERT = 15; 	public static final int DROP_JAR = 17;	public static final int REPLACE_JAR = 18;	public static final int DROP_CONSTRAINT = 19; 	public static final int SET_CONSTRAINTS_ENABLE = 20;	public static final int SET_CONSTRAINTS_DISABLE = 21;	public static final int CREATE_CONSTRAINT = 22;	public static final int INTERNAL_RECOMPILE_REQUEST = 23;	public static final int DROP_TRIGGER = 27;	public static final int CREATE_TRIGGER = 28;	public static final int SET_TRIGGERS_ENABLE = 29;	public static final int SET_TRIGGERS_DISABLE = 30;	public static final int MODIFY_COLUMN_DEFAULT = 31;	public static final int DROP_SCHEMA = 32;	public static final int COMPRESS_TABLE = 33;	//using same action for rename table/column	public static final int RENAME = 34;	public static final int DROP_TABLE_CASCADE = 35;	public static final int DROP_VIEW_CASCADE = 36;	public static final int DROP_COLUMN = 37;	public static final int DROP_COLUMN_CASCADE = 38;	public static final int DROP_STATISTICS = 39;	public static final int UPDATE_STATISTICS = 40;	//rename index dependency behavior is not as stringent as rename table and column and	//hence we need a different action for rename index. Rename index tries to imitate the	//drop index behavior for dependency which is not very strict.	public static final int RENAME_INDEX = 41;	public static final int TRUNCATE_TABLE = 42;	public static final int DROP_SYNONYM = 43;    /**     * Extensions to this interface may use action codes > MAX_ACTION_CODE without fear of     * clashing with action codes in this base interface.     */    public static final int MAX_ACTION_CODE = 0XFFFF;	/**		adds a dependency from the dependent on the provider.		This will be considered to be the default type of		dependency, when dependency types show up.		<p>		Implementations of addDependency should be fast --		performing alot of extra actions to add a dependency would		be a detriment.		@param d	the dependent		@param p	the provider		@param cm	Current ContextManager		@exception StandardException thrown if something goes wrong	 */	void addDependency(Dependent d, Provider p, ContextManager cm) throws StandardException; 	/**		mark all dependencies on the named provider as invalid.		When invalidation types show up, this will use the default		invalidation type. The dependencies will still exist once		they are marked invalid; clearDependencies should be used		to remove dependencies that a dependent has or provider gives.		<p>		Implementations of this can take a little time, but are not		really expected to recompile things against any changes		made to the provider that caused the invalidation. The		dependency system makes no guarantees about the state of		the provider -- implementations can call this before or		after actually changing the provider to its new state.		<p>		Implementations should throw DependencyStatementException		if the invalidation should be disallowed.		@param p the provider		@param action	The action causing the invalidate		@param lcc		The LanguageConnectionContext		@exception StandardException thrown if unable to make it invalid	 */	void invalidateFor(Provider p, int action, LanguageConnectionContext lcc) 		throws StandardException;	/**		Erases all of the dependencies the dependent has, be they		valid or invalid, of any dependency type.  This action is		usually performed as the first step in revalidating a		dependent; it first erases all the old dependencies, then		revalidates itself generating a list of new dependencies,		and then marks itself valid if all its new dependencies are		valid.		<p>		There might be a future want to clear all dependencies for		a particular provider, e.g. when destroying the provider.		However, at present, they are assumed to stick around and		it is the responsibility of the dependent to erase them when		revalidating against the new version of the provider.		<p>		clearDependencies will delete dependencies if they are		stored; the delete is finalized at the next commit.		@param d the dependent		@param p the provider	 *	 * @exception StandardException		Thrown on failure	 */	void clearDependencies(LanguageConnectionContext lcc, Dependent d) throws StandardException;	/**	 * Clear the specified in memory dependency.	 * This is useful for clean-up when an exception occurs.	 * (We clear all in-memory dependencies added in the current	 * StatementContext.)	   This method will handle Dependency's that have already been	   removed from the DependencyManager.	 */	public void clearInMemoryDependency(Dependency dy);	/**	 * Get a new array of ProviderInfos representing all the persistent	 * providers for the given dependent.	 *	 * @exception StandardException		Thrown on error.	 */	public ProviderInfo[] getPersistentProviderInfos(Dependent dependent)			throws StandardException;	/**	 * Get a new array of ProviderInfos representing all the persistent	 * providers from the given list of providers.	 *	 * @exception StandardException		Thrown on error.	 */	public ProviderInfo[] getPersistentProviderInfos(ProviderList pl)			throws StandardException;	/**	 * Clear the in memory column bit map information in any table descriptor	 * provider in a provider list.  This function needs to be called before	 * the table descriptor is reused as provider in column dependency.  For	 * example, this happens in "create publication" statement with target-only	 * DDL where more than one views are defined and they all reference one	 * table.	 *	 * @exception StandardException		Thrown on error.	 */	public void clearColumnInfoInProviders(ProviderList pl)			throws StandardException;	/** 	 * Copy dependencies from one dependent to another.	 *	 * @param copy_From the dependent to copy from		 * @param copyTo the dependent to copy to	 * @param persistentOnly only copy persistent dependencies	 * @param cm			Current ContextManager	 *	 * @exception StandardException		Thrown on error.	 */	public void copyDependencies(									Dependent	copy_From, 									Dependent	copyTo,									boolean		persistentOnly,									ContextManager cm)			throws StandardException;		/**	 * Returns a string representation of the SQL action, hence no	 * need to internationalize, which is causing the invokation	 * of the Dependency Manager.	 *	 * @param int		The action	 *	 * @return String	The String representation	 */	String getActionString(int action);	/**	 * Count the number of active dependencies, both stored and in memory,	 * in the system.	 *	 * @return int		The number of active dependencies in the system.		@exception StandardException thrown if something goes wrong	 */	public int countDependencies() 		throws StandardException;	/**	 * Dump out debugging info on all of the dependencies currently	 * within the system.	 *	 * @return String	Debugging info on the dependencies.	 *					(null if SanityManger.DEBUG is false)		@exception StandardException thrown if something goes wrong		@exception java.sql.SQLException thrown if something goes wrong	 */	public String dumpDependencies() throws StandardException, java.sql.SQLException;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -