Home » db-derby-10.5.3.0 » org.apache.derby.impl.sql.depend » [javadoc | source]
org.apache.derby.impl.sql.depend
public class: BasicDependencyManager [javadoc | source]
java.lang.Object
   org.apache.derby.impl.sql.depend.BasicDependencyManager

All Implemented Interfaces:
    DependencyManager

The dependency manager tracks needs that dependents have of providers.
Constructor:
 public BasicDependencyManager(DataDictionary dd) 
Method from org.apache.derby.impl.sql.depend.BasicDependencyManager Summary:
addDependency,   clearColumnInfoInProviders,   clearDependencies,   clearDependencies,   clearInMemoryDependency,   clearProviderDependency,   copyDependencies,   copyDependencies,   countDependencies,   dumpDependencies,   getActionString,   getPersistentProviderInfos,   getPersistentProviderInfos,   invalidateFor
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.derby.impl.sql.depend.BasicDependencyManager Detail:
 public  void addDependency(Dependent d,
    Provider p,
    ContextManager cm) throws StandardException 
    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.

    Implementations of addDependency should be fast -- performing alot of extra actions to add a dependency would be a detriment.

 public  void clearColumnInfoInProviders(ProviderList pl) throws StandardException 
 public  void clearDependencies(LanguageConnectionContext lcc,
    Dependent d) 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.

    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.

    clearDependencies will delete dependencies if they are stored; the delete is finalized at the next commit.

 public  void clearDependencies(LanguageConnectionContext lcc,
    Dependent d,
    TransactionController tc) throws StandardException 
 public  void clearInMemoryDependency(Dependency dy) 
    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.)
 protected  void clearProviderDependency(UUID p,
    Dependency d) 
    removes a dependency for a given provider. assumes that the dependent removal is being dealt with elsewhere. Won't assume that the dependent only appears once in the list.
 public  void copyDependencies(Dependent copy_From,
    Dependent copyTo,
    boolean persistentOnly,
    ContextManager cm) throws StandardException 
    Copy dependencies from one dependent to another.
 public synchronized  void copyDependencies(Dependent copy_From,
    Dependent copyTo,
    boolean persistentOnly,
    ContextManager cm,
    TransactionController tc) throws StandardException 
 public int countDependencies() throws StandardException 
    Count the number of active dependencies, both stored and in memory, in the system.
 public String dumpDependencies() throws StandardException, SQLException 
    Dump out debugging info on all of the dependencies currently within the system.
 public String getActionString(int action) 
    Returns a string representation of the SQL action, hence no need to internationalize, which is causing the invokation of the Dependency Manager.
 public synchronized ProviderInfo[] getPersistentProviderInfos(Dependent dependent) throws StandardException 
 public ProviderInfo[] getPersistentProviderInfos(ProviderList pl) throws StandardException 
 public  void invalidateFor(Provider p,
    int action,
    LanguageConnectionContext lcc) 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.

    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.

    Implementations should throw StandardException if the invalidation should be disallowed.