public class FileLockNodeManager extends NodeManager
Modifier and Type | Field and Description |
---|---|
protected boolean |
interrupted |
protected long |
lockAcquisitionTimeout |
channel, FIRST_TIME_START, replicatedBackup
Constructor and Description |
---|
FileLockNodeManager(File directory,
boolean replicatedBackup) |
FileLockNodeManager(File directory,
boolean replicatedBackup,
long lockAcquisitionTimeout) |
Modifier and Type | Method and Description |
---|---|
void |
awaitLiveNode() |
void |
awaitLiveStatus() |
void |
crashLiveServer() |
void |
interrupt() |
boolean |
isAwaitingFailback() |
boolean |
isBackupLive() |
boolean |
isLiveLocked() |
protected FileLock |
lock(int liveLockPos) |
void |
pauseLiveServer() |
SimpleString |
readNodeId() |
void |
releaseBackup() |
void |
start() |
void |
startBackup() |
ActivateCallback |
startLiveNode() |
protected FileLock |
tryLock(int lockPos) |
createNodeId, getNodeId, getUUID, isStarted, newFile, setNodeID, setUpServerLockFile, setUUID, stop, stopBackup
protected long lockAcquisitionTimeout
protected boolean interrupted
public FileLockNodeManager(File directory, boolean replicatedBackup)
public FileLockNodeManager(File directory, boolean replicatedBackup, long lockAcquisitionTimeout)
public void start() throws Exception
start
in interface ActiveMQComponent
start
in class NodeManager
Exception
public boolean isAwaitingFailback() throws Exception
isAwaitingFailback
in class NodeManager
Exception
public boolean isBackupLive() throws Exception
isBackupLive
in class NodeManager
Exception
public boolean isLiveLocked()
public void interrupt()
interrupt
in class NodeManager
public final void releaseBackup() throws Exception
releaseBackup
in class NodeManager
Exception
public void awaitLiveNode() throws Exception
awaitLiveNode
in class NodeManager
Exception
public void startBackup() throws Exception
startBackup
in class NodeManager
Exception
public ActivateCallback startLiveNode() throws Exception
startLiveNode
in class NodeManager
Exception
public void pauseLiveServer() throws Exception
pauseLiveServer
in class NodeManager
Exception
public void crashLiveServer() throws Exception
crashLiveServer
in class NodeManager
Exception
public void awaitLiveStatus() throws Exception
awaitLiveStatus
in class NodeManager
Exception
public final SimpleString readNodeId() throws ActiveMQIllegalStateException, IOException
readNodeId
in class NodeManager
ActiveMQIllegalStateException
IOException
Copyright © 2017 JBoss by Red Hat. All rights reserved.