@Immutable public final class RSInfo extends Object
Constructor and Description |
---|
RSInfo(ReplicationServerId rsId,
HostPort rsHostPort,
long generationId,
GroupId groupId,
ProcessId processId,
int weight)
Creates a new instance of RSInfo with every given info.
|
Modifier and Type | Method and Description |
---|---|
RSInfo |
changeHostPort(HostPort newHostPort)
Returns a new RSInfo object where the host port has been changed to the provided value.
|
boolean |
equals(Object obj)
Test if the passed object is equal to this one.
|
long |
getGenerationId()
Get the generation id RS is using.
|
GroupId |
getGroupId()
Get the RS group id.
|
HostPort |
getHostPort()
Gets the server host port.
|
ProcessId |
getProcessId()
Get the RS process id.
|
int |
getWeight()
Get the RS weight.
|
int |
hashCode()
Computes hash code for this object instance.
|
ReplicationServerId |
replicationServerId()
Get the RS server id.
|
String |
toString()
Returns a string representation of the DS info.
|
public RSInfo(ReplicationServerId rsId, HostPort rsHostPort, long generationId, GroupId groupId, ProcessId processId, int weight)
rsId
- The replication server idrsHostPort
- host port of the RSgenerationId
- The generation id the RS is usinggroupId
- RS group idprocessId
- RS process idweight
- RS weightpublic RSInfo changeHostPort(HostPort newHostPort)
newHostPort
- the new host portpublic ReplicationServerId replicationServerId()
public long getGenerationId()
public GroupId getGroupId()
public ProcessId getProcessId()
ProcessId.UNKNOWN_PROCESS_ID
if it did not specify its process
id.public int getWeight()
public boolean equals(Object obj)
public int hashCode()
public HostPort getHostPort()
Copyright 2010-2022 ForgeRock AS.