|
Platform SDK Java 8.5 API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.genesyslab.platform.applicationblocks.warmstandby.WarmStandbyService
public class WarmStandbyService
WarmStandbyService class realizes a redundancy configuration consisting of two servers: Primary and Backup, where the Primary server operates in active mode and the Backup server in standby mode. Only the Primary server accepts connections and message exchanges with the clients. In case of the Primary server failure, the Backup server switches to active mode assuming the role and behavior of the Primary server.
Constructor Summary | |
---|---|
WarmStandbyService(Protocol protocolChannel)
Creates a WarmStandbyService instance. |
Method Summary | |
---|---|
void |
addListener(WarmStandbyListener listener)
Adds listener about WarmStandbyService events. |
void |
applyConfiguration(WarmStandbyConfiguration conf)
Sets WarmStandby Configuration. |
void |
applyConfiguration(WarmStandbyConfiguration conf,
boolean reset)
Sets WarmStandby Configuration. |
short |
getAttempt()
Gets current reconnection attempt value. |
Protocol |
getChannel()
Gets the channel the WarmStandbyService is responsible for. |
WarmStandbyConfiguration |
getConfiguration()
Gets WarmStandbyService Configuration. |
protected AsyncInvoker |
getInvoker()
Access to the internal invoker. |
WarmStandbyState |
getState()
Gets the WarmStandbyService State. |
short |
getSwitchover()
Gets current switchover number value. |
protected void |
processConnectivityFailure(ChannelClosedEvent event)
Callback method for connection lost event handling. |
void |
removeListener(WarmStandbyListener listener)
Removes listener about WarmStandbyService events. |
void |
setConnectionFailureHandler(WarmStandbyConnectionFailureHandler handler)
|
void |
setInvoker(AsyncInvoker invoker)
Sets invoker. |
void |
start()
Activates (switches on) the WarmStandbyService. |
void |
stop()
Deactivates (switches off) the WarmStandbyService. |
protected void |
switchover()
Switches over Active and Standby (server) Uri's. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WarmStandbyService(Protocol protocolChannel)
protocolChannel
- channel the WarmStandbyService is responsible forMethod Detail |
---|
public void start()
java.lang.IllegalStateException
- if this class is in inappropriate state
to start (already started, not configured)public void stop()
java.lang.IllegalStateException
- if this class is in inappropriate state
to stop (is not started)public void setConnectionFailureHandler(WarmStandbyConnectionFailureHandler handler)
public void applyConfiguration(WarmStandbyConfiguration conf)
conf
- WarmStandby configurationpublic void applyConfiguration(WarmStandbyConfiguration conf, boolean reset)
conf
- WarmStandby configurationreset
- flag to reset reconnect attempt counterpublic final void addListener(WarmStandbyListener listener)
listener
- event listenerpublic final void removeListener(WarmStandbyListener listener)
listener
- event listenerpublic final Protocol getChannel()
public final void setInvoker(AsyncInvoker invoker)
invoker
- asynchronous invokerpublic final WarmStandbyConfiguration getConfiguration()
public final WarmStandbyState getState()
public final short getAttempt()
public final short getSwitchover()
protected void switchover()
protected AsyncInvoker getInvoker()
protected void processConnectivityFailure(ChannelClosedEvent event)
event
- connection lost event
|
Platform SDK Java 8.5 API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |