Package org.xmldb.api.modules
Interface DatabaseInstanceService
-
- All Superinterfaces:
Configurable,Service
public interface DatabaseInstanceService extends Service
A service to manage the database instance. The service defines a single method shutdown() to shut down the database instance used by the current driver.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanisLocalInstance()Returnstrueif the database instance is running local, i.e. in the same thread as this service.voidshutdown()Immediately shutdown the current database instance.voidshutdown(long delay)Shutdown the current database instance after the specified delay (in milliseconds).-
Methods inherited from interface org.xmldb.api.base.Configurable
getProperty, getProperty, setProperty
-
Methods inherited from interface org.xmldb.api.base.Service
getName, getVersion, setCollection
-
-
-
-
Method Detail
-
shutdown
void shutdown() throws XMLDBExceptionImmediately shutdown the current database instance. The current user must be a member of the "dba" group or an exception will be thrown. This operation is synchronous and will not return until the database is shutdown- Throws:
XMLDBException- with expected error codes.ErrorCodes.VENDOR_ERRORfor any vendor specific errors that occur.
-
shutdown
void shutdown(long delay) throws XMLDBExceptionShutdown the current database instance after the specified delay (in milliseconds). The current user must be a member of the "dba" group or an exception will be thrown. This operation is asynchronous and the delay is scheduled with the database scheduler.- Parameters:
delay- the delay in milliseconds to wait before shutdown- Throws:
XMLDBException- with expected error codes.ErrorCodes.VENDOR_ERRORfor any vendor specific errors that occur.
-
isLocalInstance
boolean isLocalInstance()
Returnstrueif the database instance is running local, i.e. in the same thread as this service.- Returns:
trueon a local instance,falseotherwise
-
-