DeveelDB  20151217
complete SQL database system, primarly developed for .NET/Mono frameworks
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
Deveel.Data.Protocol.DefaultLocalBootable.LocalDatabaseInterface Class Reference

A local implementation of DatabaseInterface that will dispose the parent ILocalBootable object when the last open connection is disposed. More...

Inheritance diagram for Deveel.Data.Protocol.DefaultLocalBootable.LocalDatabaseInterface:

Public Member Functions

 LocalDatabaseInterface (DefaultLocalBootable localBootable, string hostString)
 

Protected Member Functions

override void Dispose (bool disposing)
 

Private Attributes

readonly DefaultLocalBootable localBootable
 
bool closed
 

Detailed Description

A local implementation of DatabaseInterface that will dispose the parent ILocalBootable object when the last open connection is disposed.

Definition at line 153 of file DefaultLocalBootable.cs.

Constructor & Destructor Documentation

Deveel.Data.Protocol.DefaultLocalBootable.LocalDatabaseInterface.LocalDatabaseInterface ( DefaultLocalBootable  localBootable,
string  hostString 
)
inline

Definition at line 157 of file DefaultLocalBootable.cs.

Member Function Documentation

override void Deveel.Data.Protocol.DefaultLocalBootable.LocalDatabaseInterface.Dispose ( bool  disposing)
inlineprotected

Definition at line 164 of file DefaultLocalBootable.cs.

164  {
165  if (disposing) {
166  if (!closed) {
167  base.Dispose(true);
168 
170 
171  // When all connections are closed, shut down...
172  if (localBootable.openConnections <= 0) {
173  // When the local database interface is disposed, we must shut down
174  // the database system.
175  localBootable.dbsys.Close();
176  localBootable.booted = false;
177  localBootable.dbsys = null;
178  }
179  closed = true;
180  }
181  }
182  }
bool booted
Set to true if the database is booted.
Control.DbSystem dbsys
The local DbSystem database object.
int openConnections
The number of connections that are current open.

Member Data Documentation

bool Deveel.Data.Protocol.DefaultLocalBootable.LocalDatabaseInterface.closed
private

Definition at line 155 of file DefaultLocalBootable.cs.

readonly DefaultLocalBootable Deveel.Data.Protocol.DefaultLocalBootable.LocalDatabaseInterface.localBootable
private

Definition at line 154 of file DefaultLocalBootable.cs.


The documentation for this class was generated from the following file: