DeveelDB  20151217
complete SQL database system, primarly developed for .NET/Mono frameworks
Public Member Functions | List of all members
Deveel.Data.Store.IStoreSystem Interface Reference

An object that creates and manages the IStore objects that the database engine uses to represent itself on an external medium such as a disk, and that constitute the low level persistent data format. More...

Inheritance diagram for Deveel.Data.Store.IStoreSystem:
Deveel.Data.Store.InMemoryStorageSystem Deveel.Data.Store.SingleFileStoreSystem

Public Member Functions

bool StoreExists (String name)
 Returns true if the store with the given name exists within the system, or false otherwise. More...
 
IStore CreateStore (String name)
 Creates and returns a new persistent Store object given the unique name of the store. More...
 
IStore OpenStore (String name)
 Opens an existing persistent Store object in the system and returns the IStore object that contains its data. More...
 
bool CloseStore (IStore store)
 Closes a store that has been either created or opened with the CreateStore or OpenStore methods. More...
 
bool DeleteStore (IStore store)
 Permanently deletes a store from the system - use with care! More...
 
void SetCheckPoint ()
 Sets a new check point at the current state of this store system. More...
 
void Lock (String lockName)
 Attempts to lock this store system exclusively so that no other process may access or change the persistent data in the store. More...
 
void Unlock (String lockName)
 Unlocks the exclusive access to the persistent store objects. More...
 

Detailed Description

An object that creates and manages the IStore objects that the database engine uses to represent itself on an external medium such as a disk, and that constitute the low level persistent data format.

This interface is an abstraction of the database persistence layer. For example, an implementation could represent itself as 1 file per store on a disk, or as a number of stores in a single file, or as an entirely in-memory database.

Definition at line 31 of file IStoreSystem.cs.

Member Function Documentation

bool Deveel.Data.Store.IStoreSystem.CloseStore ( IStore  store)

Closes a store that has been either created or opened with the CreateStore or OpenStore methods.

Parameters
store
Returns
Returns true if the store was successfully closed.

Implemented in Deveel.Data.Store.SingleFileStoreSystem, and Deveel.Data.Store.InMemoryStorageSystem.

IStore Deveel.Data.Store.IStoreSystem.CreateStore ( String  name)

Creates and returns a new persistent Store object given the unique name of the store.

Parameters
nameA unique identifier string representing the name of the store.

If the system is read-only or the table otherwise can not be created then an exception is thrown.

Returns
bool Deveel.Data.Store.IStoreSystem.DeleteStore ( IStore  store)

Permanently deletes a store from the system - use with care!

Parameters
store

Note that it is quite likely that a store may fail to delete in which case the delete operation should be re-tried after a short timeout.

Returns
Returns true if the store was successfully deleted and the resources associated with it were freed. Returns false if the store could not be deleted.

Implemented in Deveel.Data.Store.SingleFileStoreSystem, and Deveel.Data.Store.InMemoryStorageSystem.

void Deveel.Data.Store.IStoreSystem.Lock ( String  lockName)

Attempts to lock this store system exclusively so that no other process may access or change the persistent data in the store.

Parameters
lockName

If this fails to lock, an IOException is generated, otherwise the lock is obtained and the method returns.

IStore Deveel.Data.Store.IStoreSystem.OpenStore ( String  name)

Opens an existing persistent Store object in the system and returns the IStore object that contains its data.

Parameters
namea unique identifier string representing the name of the store.

An exception is thrown if the store can not be opened.

Returns
void Deveel.Data.Store.IStoreSystem.SetCheckPoint ( )

Sets a new check point at the current state of this store system.

This is intended to help journalling check point and recovery systems. A check point is set whenever data is committed to the database. Some systems can be designed to be able to roll forward or backward to different check points. Each check point represents a stable state in the database life cycle.

A checkpoint based system greatly improves stability because if a crash occurs in an intermediate state the changes can simply be rolled back to the last stable state.

An implementation may choose not to implement check points in which case this would be a no-op.

Implemented in Deveel.Data.Store.SingleFileStoreSystem, and Deveel.Data.Store.InMemoryStorageSystem.

bool Deveel.Data.Store.IStoreSystem.StoreExists ( String  name)

Returns true if the store with the given name exists within the system, or false otherwise.

Parameters
name
Returns
void Deveel.Data.Store.IStoreSystem.Unlock ( String  lockName)

Unlocks the exclusive access to the persistent store objects.

Parameters
lockName

After this method completes, access to the store system by other processes is allowed.


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