|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.space4j.implementation.SimpleSpace4J
org.space4j.implementation.SlaveSpace4J
public class SlaveSpace4J
This is complex, but it works. Users of Space4J do not have to understand this to use the system. The true power of encapsulation and simplicity.
| Field Summary |
|---|
| Fields inherited from class org.space4j.implementation.SimpleSpace4J |
|---|
dirname, im, logger, snapTime, space, thread |
| Constructor Summary | |
|---|---|
SlaveSpace4J(java.lang.String dirname,
long snapTime,
java.lang.String master_ip)
Initializes the SlaveSpace4J. |
|
SlaveSpace4J(java.lang.String dirname,
long snapTime,
java.lang.String master_ip,
int master_port,
int slave_port)
Initializes the SlaveSpace4J. |
|
SlaveSpace4J(java.lang.String dirname,
java.lang.String master_ip)
|
|
SlaveSpace4J(java.lang.String dirname,
java.lang.String master_ip,
int master_port,
int slave_port)
|
|
| Method Summary | |
|---|---|
int |
exec(Command cmd)
Execute a command and log it. |
void |
executeSnapshot()
Take a snapshot of the Space to disk. |
void |
run()
|
void |
start()
Starts the Space4J. |
| Methods inherited from class org.space4j.implementation.SimpleSpace4J |
|---|
exec, getDirName, getSpace, readSnapshot, reapply, reapplyCommandsFromLog |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SlaveSpace4J(java.lang.String dirname,
long snapTime,
java.lang.String master_ip)
throws LoggerException,
CommandException
dirname - The dir where the space is stored.master_ip - The ip address of the master.
LoggerException
CommandExceptionSimpleSpace4J
public SlaveSpace4J(java.lang.String dirname,
java.lang.String master_ip)
throws LoggerException,
CommandException
LoggerException
CommandException
public SlaveSpace4J(java.lang.String dirname,
long snapTime,
java.lang.String master_ip,
int master_port,
int slave_port)
throws LoggerException,
CommandException
dirname - The dir where the space is stored.master_ip - The ip address of the master.master_port - The port the master is listening.slave_port - The port this slave will be listening.
LoggerException
CommandExceptionSimpleSpace4J
public SlaveSpace4J(java.lang.String dirname,
java.lang.String master_ip,
int master_port,
int slave_port)
throws LoggerException,
CommandException
LoggerException
CommandException| Method Detail |
|---|
public void start()
throws java.net.UnknownHostException,
java.io.IOException,
java.lang.ClassNotFoundException
Space4J
start in interface Space4Jstart in class SimpleSpace4Jjava.net.UnknownHostException
java.io.IOException
java.lang.ClassNotFoundException
public int exec(Command cmd)
throws CommandException
SimpleSpace4J
exec in interface Space4Jexec in class SimpleSpace4Jcmd - The command to be executed and logged.
CommandException - if there is a problem executing this command
public void executeSnapshot()
throws LoggerException
Space4J
executeSnapshot in interface Space4JexecuteSnapshot in class SimpleSpace4JLoggerExceptionpublic void run()
run in interface java.lang.Runnablerun in class SimpleSpace4J
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||