org.apache.derby.impl.db
Class DatabaseContextImpl
java.lang.Object
org.apache.derby.iapi.services.context.ContextImpl
org.apache.derby.impl.db.DatabaseContextImpl
- All Implemented Interfaces:
- Context, DatabaseContext
- class DatabaseContextImpl
- extends ContextImpl
- implements DatabaseContext
A context that shutdowns down the database on a databsae exception.
Fields inherited from class org.apache.derby.iapi.services.context.ContextImpl |
|
Method Summary |
void |
cleanupOnError(java.lang.Throwable t)
Contexts will be passed errors that are caught
by the outer system when they are serious enough
to require corrective action. |
boolean |
equals(java.lang.Object other)
|
Database |
getDatabase()
|
int |
hashCode()
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
db
private final Database db
DatabaseContextImpl
DatabaseContextImpl(ContextManager cm,
Database db)
cleanupOnError
public void cleanupOnError(java.lang.Throwable t)
- Description copied from interface:
Context
- Contexts will be passed errors that are caught
by the outer system when they are serious enough
to require corrective action. They will be told
what the error is, so that they can react appropriately.
Most of the time, the contexts will react by either
doing nothing or by removing themselves from the
context manager. If there are no other references
to the context, removing itself from the manager
equates to freeing it.
Contexts must release all their resources before
removing themselves from their context manager.
The context manager
will "unwind" the contexts during cleanup in the
reverse order they were placed on its global stack.
If error is an instance of StandardException then an implementation
of this method may throw a new exception if and only if the new exception
is an instance of StandardException that is more severe than the original error
or the new exception is a not an instance of StandardException (e.g java.lang.NullPointerException).
- Specified by:
cleanupOnError
in interface Context
equals
public boolean equals(java.lang.Object other)
hashCode
public int hashCode()
getDatabase
public Database getDatabase()
- Specified by:
getDatabase
in interface DatabaseContext
Apache Derby V10.0 Engine Documentation - Copyright © 1997,2004 The Apache Software Foundation or its licensors, as applicable.