|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.garret.perst.StorageFactory
Storage factory
| Constructor Summary | |
StorageFactory()
|
|
| Method Summary | |
ReplicationMasterStorage |
createReplicationMasterStorage(java.lang.String[] replicationSlaveNodes,
int asyncBufSize)
Create new instance of the master node of replicated storage |
ReplicationSlaveStorage |
createReplicationSlaveStorage(int port)
Create new instance of the slave node of replicated storage |
Storage |
createStorage()
Create new instance of the storage |
static StorageFactory |
getInstance()
Get instance of storage factory. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public StorageFactory()
| Method Detail |
public ReplicationMasterStorage createReplicationMasterStorage(java.lang.String[] replicationSlaveNodes,
int asyncBufSize)
replicationSlaveNodes - addresses of hosts to which replication will be performed.
Address as specified as NAME:PORTasyncBufSize - 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.
public ReplicationSlaveStorage createReplicationSlaveStorage(int port)
port - socket port at which connection from master will be established
public Storage createStorage()
public static StorageFactory getInstance()
StorageFactory.getInstance().createStorage()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||