public abstract class NodeManager extends Object implements ActiveMQComponent
Modifier and Type | Field and Description |
---|---|
protected FileChannel |
channel |
protected static byte |
FIRST_TIME_START |
protected boolean |
replicatedBackup |
Constructor and Description |
---|
NodeManager(boolean replicatedBackup,
File directory) |
Modifier and Type | Method and Description |
---|---|
abstract void |
awaitLiveNode() |
abstract void |
awaitLiveStatus() |
abstract void |
crashLiveServer() |
protected void |
createNodeId() |
SimpleString |
getNodeId() |
UUID |
getUUID() |
abstract void |
interrupt() |
abstract boolean |
isAwaitingFailback() |
abstract boolean |
isBackupLive() |
boolean |
isStarted() |
protected File |
newFile(String fileName) |
abstract void |
pauseLiveServer() |
abstract SimpleString |
readNodeId() |
abstract void |
releaseBackup() |
void |
setNodeID(String nodeID)
Sets the nodeID.
|
protected void |
setUpServerLockFile()
Ensures existence of persistent information about the server's nodeID.
|
protected void |
setUUID(UUID generateUUID) |
void |
start() |
abstract void |
startBackup() |
abstract ActivateCallback |
startLiveNode() |
void |
stop() |
void |
stopBackup() |
protected static final byte FIRST_TIME_START
protected final boolean replicatedBackup
protected FileChannel channel
public NodeManager(boolean replicatedBackup, File directory)
public abstract ActivateCallback startLiveNode() throws Exception
Exception
public void start() throws Exception
start
in interface ActiveMQComponent
Exception
public boolean isStarted()
isStarted
in interface ActiveMQComponent
public SimpleString getNodeId()
public abstract SimpleString readNodeId() throws ActiveMQIllegalStateException, IOException
public UUID getUUID()
public void setNodeID(String nodeID)
Only used by replicating backups.
nodeID
- protected void setUUID(UUID generateUUID)
generateUUID
- public abstract void interrupt()
public void stop() throws Exception
stop
in interface ActiveMQComponent
Exception
protected final void setUpServerLockFile() throws IOException
Roughly the different use cases are:
IOException
protected final void createNodeId() throws IOException
IOException
Copyright © 2017 JBoss by Red Hat. All rights reserved.