com.zeroturnaround.liverebel.api.impl
Class FailoverOperationsImpl
java.lang.Object
com.zeroturnaround.liverebel.api.impl.FailoverOperationsImpl
- All Implemented Interfaces:
- FailoverOperations
public class FailoverOperationsImpl
- extends Object
- implements FailoverOperations
Implements operations related to Failover Command Center (some of them expect that this LiveRebel is failover, some of them expect that it is primary)
- Author:
- Ats Uiboupin
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FailoverOperationsImpl
public FailoverOperationsImpl(RestConnection con)
registerAsFailover
public boolean registerAsFailover(String primaryHost,
int primaryPort,
String token)
- Description copied from interface:
FailoverOperations
- Registers this Command Center as a Failover Command Center to Primary Command Center that runs on
- Specified by:
registerAsFailover in interface FailoverOperations
- Parameters:
primaryHost - - primary server hostprimaryPort - - primary server porttoken - - primary server user auth-token that will be used for initial authentication
- Returns:
- true is registration was successful.
checkPrimaryAlive
public boolean checkPrimaryAlive()
- Specified by:
checkPrimaryAlive in interface FailoverOperations
- Returns:
- true if primary is alive or this server is not configured as failover
syncWithFailover
public void syncWithFailover()
- Description copied from interface:
FailoverOperations
- If this server has failover slave, this will schedule synchronizing in 3s.
Otherwise it has no effect.
- Specified by:
syncWithFailover in interface FailoverOperations
getLastFailoverSyncTime
public Date getLastFailoverSyncTime()
- Specified by:
getLastFailoverSyncTime in interface FailoverOperations
- Returns:
- date of last time when this servers synced with failover server
isAcceptingPushes
public boolean isAcceptingPushes()
- Specified by:
isAcceptingPushes in interface FailoverOperations
startAcceptingPushes
public void startAcceptingPushes()
- Specified by:
startAcceptingPushes in interface FailoverOperations
Copyright © 2013. All Rights Reserved.