public abstract class NodeManager extends Object implements org.apache.activemq.artemis.core.server.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() |
org.apache.activemq.artemis.api.core.SimpleString |
getNodeId() |
org.apache.activemq.artemis.utils.UUID |
getUUID() |
abstract void |
interrupt() |
abstract boolean |
isAwaitingFailback() |
abstract boolean |
isBackupLive() |
boolean |
isStarted() |
protected File |
newFile(String fileName) |
abstract void |
pauseLiveServer() |
abstract org.apache.activemq.artemis.api.core.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(org.apache.activemq.artemis.utils.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
Exceptionpublic void start()
throws Exception
start in interface org.apache.activemq.artemis.core.server.ActiveMQComponentExceptionpublic boolean isStarted()
isStarted in interface org.apache.activemq.artemis.core.server.ActiveMQComponentpublic org.apache.activemq.artemis.api.core.SimpleString getNodeId()
public abstract org.apache.activemq.artemis.api.core.SimpleString readNodeId()
throws org.apache.activemq.artemis.api.core.ActiveMQIllegalStateException,
IOException
org.apache.activemq.artemis.api.core.ActiveMQIllegalStateExceptionIOExceptionpublic org.apache.activemq.artemis.utils.UUID getUUID()
public void setNodeID(String nodeID)
Only used by replicating backups.
nodeID - protected void setUUID(org.apache.activemq.artemis.utils.UUID generateUUID)
generateUUID - public abstract void interrupt()
public void stop()
throws Exception
stop in interface org.apache.activemq.artemis.core.server.ActiveMQComponentExceptionprotected final void setUpServerLockFile()
throws IOException
Roughly the different use cases are:
IOExceptionprotected final void createNodeId()
throws IOException
IOExceptionCopyright © 2023 The Apache Software Foundation. All rights reserved.