public class LusBasedSelectorHandler extends LeaderSelectorHandler implements IActiveElectionListener
_lastError, _logger, _primarySpaceModeListeners, _space, _spaceMember, _spaceMode| Constructor and Description |
|---|
LusBasedSelectorHandler(SpaceProxyImpl securedProxy) |
| Modifier and Type | Method and Description |
|---|---|
void |
forceMoveToPrimary()
Forcefully make this space to be primary
|
Throwable |
getLastError() |
String |
getPrimaryMemberName() |
void |
initialize(LeaderSelectorHandlerConfig config) |
boolean |
isPrimary() |
void |
onActive(ActiveElectionEvent theEvent)
Notification about new elected Active service.
|
void |
onExtraBackup(ActiveElectionEvent theEvent)
Notification that an extra-backup was resolved.
|
void |
onSplitBrain(ActiveElectionEvent theEvent)
Notification about split-brain.
|
void |
onSplitBrainActive(ActiveElectionEvent theEvent)
Notification that split-brain was resolved - current service remains primary.
|
void |
onSplitBrainBackup(ActiveElectionEvent theEvent)
Notification about a backup that it's primary has changed due to split-brain.
|
void |
select()
start the primary election manager
|
void |
setLastError(Throwable lastError) |
void |
terminate()
terminate the PrimarySpaceSelector
|
addListenerAndNotify, afterSpaceModeChange, beforeSpaceModeChange, compareAndRegister, dispatchBeforeEventToRemoteListeners, getSpaceMode, moveToBackup, moveToPrimary, moveToUnusable, removeListener, setSpaceModepublic LusBasedSelectorHandler(SpaceProxyImpl securedProxy)
public void initialize(LeaderSelectorHandlerConfig config) throws Exception
initialize in class LeaderSelectorHandlerExceptionpublic boolean isPrimary()
isPrimary in interface LeaderSelectorisPrimary in class LeaderSelectorHandlertrueif the Space is primary, otherwise the space in backup mode.public String getPrimaryMemberName()
getPrimaryMemberName in interface LeaderSelectorpublic void select()
throws RemoteException
select in interface LeaderSelectorRemoteExceptionpublic void onActive(ActiveElectionEvent theEvent)
IActiveElectionListeneronActive in interface IActiveElectionListenertheEvent - The election event with an Active service reference.IActiveElectionListener.onActive(ActiveElectionEvent)public void onSplitBrain(ActiveElectionEvent theEvent)
IActiveElectionListeneronSplitBrain in interface IActiveElectionListenertheEvent - the active service (the new primary)IActiveElectionListener.onSplitBrain(ActiveElectionEvent)public void onSplitBrainActive(ActiveElectionEvent theEvent)
IActiveElectionListeneronSplitBrainActive in interface IActiveElectionListenertheEvent - the active service (same as the current elected)public void onExtraBackup(ActiveElectionEvent theEvent)
IActiveElectionListeneronExtraBackup in interface IActiveElectionListenertheEvent - the active service used as reference for resolutionpublic void onSplitBrainBackup(ActiveElectionEvent theEvent)
IActiveElectionListeneronSplitBrainBackup in interface IActiveElectionListenertheEvent - the active service (the new primary)public void terminate()
terminate in interface LeaderSelectorpublic void forceMoveToPrimary()
throws RemoteException
forceMoveToPrimary in class LeaderSelectorHandlerRemoteExceptionpublic Throwable getLastError()
getLastError in interface LeaderSelectorgetLastError in class LeaderSelectorHandlerpublic void setLastError(Throwable lastError)
setLastError in interface LeaderSelectorsetLastError in class LeaderSelectorHandlerCopyright © GigaSpaces.