|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jmux.app.component.AbstractComponent org.jmux.app.component.AbstractControl org.jmux.app.component.SingletonProcess
public class SingletonProcess
This component ensures that only one version of an application is started on a single machine. Given Java's lack of system wide mutexes, the way we to do this is to try to bind a to a socket. A less resource expensive alternative would be to use java.nio locking. I'm not sure how portable this is though. In some environments, atomic locking is flaky at best. Older implementations of NFS on Linux come to mind.
Constructor Summary | |
---|---|
SingletonProcess()
|
Method Summary | |
---|---|
void |
configure(Config config,
App app)
|
void |
start()
|
void |
stop()
|
Methods inherited from class org.jmux.app.component.AbstractComponent |
---|
getConfig, log, logDebug, logDebug, logError, logError |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SingletonProcess()
Method Detail |
---|
public void configure(Config config, App app)
configure
in interface Component
configure
in class AbstractComponent
public void start()
public void stop()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |