Class TopologyMemberImpl
- java.lang.Object
-
- org.apache.activemq.artemis.core.client.impl.TopologyMemberImpl
-
- All Implemented Interfaces:
TopologyMember
public final class TopologyMemberImpl extends Object implements TopologyMember
-
-
Constructor Summary
Constructors Constructor Description TopologyMemberImpl(String nodeId, String backupGroupName, String scaleDownGroupName, TransportConfiguration a, TransportConfiguration b)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)TransportConfigurationgetBackup()Returns the TransportConfiguration relative to the backup server if any.StringgetBackupGroupName()Returns thebackup-group-nameof the live server and backup servers associated with Topology entry.Pair<TransportConfiguration,TransportConfiguration>getConnector()TransportConfigurationgetLive()StringgetNodeId()Returns the nodeId of the server.StringgetScaleDownGroupName()Returns thescale-down-group-nameof the live server with this Topology entry.longgetUniqueEventID()inthashCode()booleanisMember(TransportConfiguration configuration)Returns true if this configuration is the target of this remoting connectionbooleanisMember(RemotingConnection connection)We only need to check if the connection point to the same node, don't need to compare the whole params map.voidsetBackup(TransportConfiguration param)voidsetLive(TransportConfiguration param)voidsetUniqueEventID(long uniqueEventID)URItoBackupURI()StringtoString()StringtoURI()
-
-
-
Constructor Detail
-
TopologyMemberImpl
public TopologyMemberImpl(String nodeId, String backupGroupName, String scaleDownGroupName, TransportConfiguration a, TransportConfiguration b)
-
-
Method Detail
-
getLive
public TransportConfiguration getLive()
- Specified by:
getLivein interfaceTopologyMember- Returns:
- configuration relative to the live server
-
getBackup
public TransportConfiguration getBackup()
Description copied from interface:TopologyMemberReturns the TransportConfiguration relative to the backup server if any.- Specified by:
getBackupin interfaceTopologyMember- Returns:
- a
TransportConfigurationfor the backup, or null} if the live server has no backup server.
-
setBackup
public void setBackup(TransportConfiguration param)
-
setLive
public void setLive(TransportConfiguration param)
-
getNodeId
public String getNodeId()
Description copied from interface:TopologyMemberReturns the nodeId of the server.- Specified by:
getNodeIdin interfaceTopologyMember- Returns:
- the nodeId
-
getUniqueEventID
public long getUniqueEventID()
- Specified by:
getUniqueEventIDin interfaceTopologyMember- Returns:
- long value representing a unique event ID
-
getBackupGroupName
public String getBackupGroupName()
Description copied from interface:TopologyMemberReturns thebackup-group-nameof the live server and backup servers associated with Topology entry.This is a server configuration value. A (remote) backup will only work with live servers that have a matching
backup-group-name.This value does not apply to "shared-storage" backup and live pairs.
- Specified by:
getBackupGroupNamein interfaceTopologyMember- Returns:
- the
backup-group-name
-
getScaleDownGroupName
public String getScaleDownGroupName()
Description copied from interface:TopologyMemberReturns thescale-down-group-nameof the live server with this Topology entry.This is a server configuration value. a live server will only send its messages to another live server with matching
scale-down-group-name.- Specified by:
getScaleDownGroupNamein interfaceTopologyMember- Returns:
- the
scale-down-group-name
-
setUniqueEventID
public void setUniqueEventID(long uniqueEventID)
- Parameters:
uniqueEventID- the uniqueEventID to set
-
getConnector
public Pair<TransportConfiguration,TransportConfiguration> getConnector()
-
isMember
public boolean isMember(RemotingConnection connection)
We only need to check if the connection point to the same node, don't need to compare the whole params map.- Specified by:
isMemberin interfaceTopologyMember- Parameters:
connection- The connection to the target node- Returns:
- true if the connection point to the same node as this member represents.
-
isMember
public boolean isMember(TransportConfiguration configuration)
Description copied from interface:TopologyMemberReturns true if this configuration is the target of this remoting connection- Specified by:
isMemberin interfaceTopologyMember- Returns:
-
toURI
public String toURI()
- Specified by:
toURIin interfaceTopologyMember
-
toBackupURI
public URI toBackupURI()
-
-