C# Class Volante.DatabaseFactory

Database factory
Mostra file Open project: kjk/volante

Public Methods

Method Description
CreateDatabase ( ) : IDatabase

Create a database instance

CreateReplicationMasterDatabase ( string replicationSlaveNodes, int asyncBufSize ) : ReplicationMasterDatabase

Create new instance of the master node of replicated database

CreateReplicationSlaveDatabase ( int port ) : ReplicationSlaveDatabase

Create new instance of the slave node of replicated database

Method Details

CreateDatabase() public static method

Create a database instance
public static CreateDatabase ( ) : IDatabase
return IDatabase

CreateReplicationMasterDatabase() public static method

Create new instance of the master node of replicated database
public static CreateReplicationMasterDatabase ( string replicationSlaveNodes, int asyncBufSize ) : ReplicationMasterDatabase
replicationSlaveNodes string addresses of hosts to which replication will be performed. /// Address as specified as NAME:PORT
asyncBufSize int if value of this parameter is greater than zero then replication will be /// asynchronous, done by separate thread and not blocking main application. /// Otherwise data is send to the slave nodes by the same thread which updates the database. /// If space asynchronous buffer is exhausted, then main thread willbe also blocked until the /// data is send.
return ReplicationMasterDatabase

CreateReplicationSlaveDatabase() public static method

Create new instance of the slave node of replicated database
public static CreateReplicationSlaveDatabase ( int port ) : ReplicationSlaveDatabase
port int socket port at which connection from master will be established
return ReplicationSlaveDatabase