C# Class Volante.Impl.ReplicationMasterFile

File performing replication of changed pages to specified slave nodes.
Inheritance: IFile
Exibir arquivo Open project: kjk/volante

Public Properties

Property Type Description
ConnectionTimeout int
LingerTime int
MaxConnectionAttempts int

Protected Properties

Property Type Description
ack bool
db ReplicationMasterDatabaseImpl
file IFile
hosts string[]
nHosts int
rcBuf byte[]
sockets Socket[]
txBuf byte[]

Public Methods

Method Description
Close ( ) : void
GetNumberOfAvailableHosts ( ) : int
HandleError ( string host ) : bool

When overriden by base class this method perfroms socket error handling

Lock ( ) : void
Read ( long pos, byte buf ) : int
ReplicationMasterFile ( IFile file, string hosts, bool ack ) : System

Constructor of replication master file

ReplicationMasterFile ( ReplicationMasterDatabaseImpl db, IFile file ) : System

Constructor of replication master file

Sync ( ) : void
Write ( long pos, byte buf ) : void

Protected Methods

Method Description
connect ( int i ) : void

Method Details

Close() public method

public Close ( ) : void
return void

GetNumberOfAvailableHosts() public method

public GetNumberOfAvailableHosts ( ) : int
return int

HandleError() public method

When overriden by base class this method perfroms socket error handling
public HandleError ( string host ) : bool
host string
return bool

Lock() public method

public Lock ( ) : void
return void

Read() public method

public Read ( long pos, byte buf ) : int
pos long
buf byte
return int

ReplicationMasterFile() public method

Constructor of replication master file
public ReplicationMasterFile ( IFile file, string hosts, bool ack ) : System
file IFile local file used to store data locally
hosts string slave node hosts to which replication will be performed
ack bool whether master should wait acknowledgment from slave node during trasanction commit
return System

ReplicationMasterFile() public method

Constructor of replication master file
public ReplicationMasterFile ( ReplicationMasterDatabaseImpl db, IFile file ) : System
db ReplicationMasterDatabaseImpl replication database
file IFile local file used to store data locally
return System

Sync() public method

public Sync ( ) : void
return void

Write() public method

public Write ( long pos, byte buf ) : void
pos long
buf byte
return void

connect() protected method

protected connect ( int i ) : void
i int
return void

Property Details

ConnectionTimeout public_oe static_oe property

public static int ConnectionTimeout
return int

LingerTime public_oe static_oe property

public static int LingerTime
return int

MaxConnectionAttempts public_oe static_oe property

public static int MaxConnectionAttempts
return int

ack protected_oe property

protected bool ack
return bool

db protected_oe property

protected ReplicationMasterDatabaseImpl,Volante.Impl db
return ReplicationMasterDatabaseImpl

file protected_oe property

protected IFile file
return IFile

hosts protected_oe property

protected string[] hosts
return string[]

nHosts protected_oe property

protected int nHosts
return int

rcBuf protected_oe property

protected byte[] rcBuf
return byte[]

sockets protected_oe property

protected Socket[] sockets
return Socket[]

txBuf protected_oe property

protected byte[] txBuf
return byte[]