| java.lang.Object org.apache.derby.impl.sql.depend.BasicDependencyManager
BasicDependencyManager | public class BasicDependencyManager implements DependencyManager(Code) | | The dependency manager tracks needs that dependents have of providers.
|
Method Summary | |
public void | addDependency(Dependent d, Provider p, ContextManager cm) adds a dependency from the dependent on the provider. | public void | clearColumnInfoInProviders(ProviderList pl) | public void | clearDependencies(LanguageConnectionContext lcc, Dependent d) Erases all of the dependencies the dependent has, be they
valid or invalid, of any dependency type. | public void | clearDependencies(LanguageConnectionContext lcc, Dependent d, TransactionController tc) | public void | clearInMemoryDependency(Dependency dy) Clear the specified in memory dependency. | protected void | clearProviderDependency(UUID p, Dependency d) removes a dependency for a given provider. | public void | copyDependencies(Dependent copy_From, Dependent copyTo, boolean persistentOnly, ContextManager cm) Copy dependencies from one dependent to another. | public synchronized void | copyDependencies(Dependent copy_From, Dependent copyTo, boolean persistentOnly, ContextManager cm, TransactionController tc) | public int | countDependencies() Count the number of active dependencies, both stored and in memory,
in the system. | public String | dumpDependencies() 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) | public ProviderInfo[] | getPersistentProviderInfos(ProviderList pl) | public void | invalidateFor(Provider p, int action, LanguageConnectionContext lcc) mark all dependencies on the named provider as invalid.
When invalidation types show up, this will use the default
invalidation type. |
BasicDependencyManager | public BasicDependencyManager()(Code) | | |
addDependency | public void addDependency(Dependent d, Provider p, ContextManager cm) throws StandardException(Code) | | 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.
Parameters: d - the dependent Parameters: p - the provider exception: StandardException - thrown if something goes wrong |
clearDependencies | public void clearDependencies(LanguageConnectionContext lcc, Dependent d) throws StandardException(Code) | | 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.
Parameters: d - the dependent exception: StandardException - Thrown on failure |
clearInMemoryDependency | public void clearInMemoryDependency(Dependency dy)(Code) | | 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.)
|
clearProviderDependency | protected void clearProviderDependency(UUID p, Dependency d)(Code) | | 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.
|
copyDependencies | public void copyDependencies(Dependent copy_From, Dependent copyTo, boolean persistentOnly, ContextManager cm) throws StandardException(Code) | | Copy dependencies from one dependent to another.
Parameters: copy_From - the dependent to copy from Parameters: copyTo - the dependent to copy to Parameters: persistentOnly - only copy persistent dependencies Parameters: cm - Current ContextManager exception: StandardException - Thrown on error. |
countDependencies | public int countDependencies() throws StandardException(Code) | | Count the number of active dependencies, both stored and in memory,
in the system.
int The number of active dependencies in the system. exception: StandardException - thrown if something goes wrong |
getActionString | public String getActionString(int action)(Code) | | Returns a string representation of the SQL action, hence no
need to internationalize, which is causing the invokation
of the Dependency Manager.
Parameters: action - The action String The String representation |
invalidateFor | public void invalidateFor(Provider p, int action, LanguageConnectionContext lcc) throws StandardException(Code) | | 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.
Parameters: p - the provider Parameters: action - The action causing the invalidate exception: StandardException - thrown if unable to make it invalid |
|
|