Class RingInstance
- java.lang.Object
-
- org.apache.cassandra.spark.bulkwriter.RingInstance
-
- All Implemented Interfaces:
java.io.Serializable,org.apache.cassandra.spark.common.model.CassandraInstance,org.apache.cassandra.spark.data.model.TokenOwner
public class RingInstance extends java.lang.Object implements org.apache.cassandra.spark.common.model.CassandraInstance, java.io.Serializable- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description RingInstance(o.a.c.sidecar.client.shaded.common.response.data.RingEntry ringEntry)RingInstance(o.a.c.sidecar.client.shaded.common.response.data.RingEntry ringEntry, java.lang.String clusterId)RingInstance(o.a.c.sidecar.client.shaded.common.response.TokenRangeReplicasResponse.ReplicaMetadata replica)RingInstance(o.a.c.sidecar.client.shaded.common.response.TokenRangeReplicasResponse.ReplicaMetadata replica, java.lang.String clusterId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringclusterId()java.lang.Stringdatacenter()booleanequals(java.lang.Object other)Custom equality that compares the token, fully qualified domain name, the port, the datacenter and the clusterId Note that node state, status, are not part of the calculation.inthashCode()Custom hashCode that compares the token, fully qualified domain name, the port, and the datacenter Note that node state and status are not part of the calculation.java.lang.StringipAddress()java.lang.StringipAddressWithPort()java.lang.StringnodeName()org.apache.cassandra.spark.common.model.NodeStatenodeState()org.apache.cassandra.spark.common.model.NodeStatusnodeStatus()o.a.c.sidecar.client.shaded.common.response.data.RingEntryringEntry()java.lang.Stringtoken()java.lang.StringtoString()
-
-
-
Constructor Detail
-
RingInstance
public RingInstance(o.a.c.sidecar.client.shaded.common.response.TokenRangeReplicasResponse.ReplicaMetadata replica, @Nullable java.lang.String clusterId)
-
RingInstance
public RingInstance(o.a.c.sidecar.client.shaded.common.response.data.RingEntry ringEntry)
-
RingInstance
public RingInstance(o.a.c.sidecar.client.shaded.common.response.data.RingEntry ringEntry, @Nullable java.lang.String clusterId)
-
RingInstance
public RingInstance(o.a.c.sidecar.client.shaded.common.response.TokenRangeReplicasResponse.ReplicaMetadata replica)
-
-
Method Detail
-
token
public java.lang.String token()
- Specified by:
tokenin interfaceorg.apache.cassandra.spark.data.model.TokenOwner
-
clusterId
@Nullable public java.lang.String clusterId()
- Specified by:
clusterIdin interfaceorg.apache.cassandra.spark.common.model.CassandraInstance
-
nodeName
public java.lang.String nodeName()
- Specified by:
nodeNamein interfaceorg.apache.cassandra.spark.common.model.CassandraInstance
-
datacenter
public java.lang.String datacenter()
- Specified by:
datacenterin interfaceorg.apache.cassandra.spark.common.model.CassandraInstance
-
ipAddress
public java.lang.String ipAddress()
- Specified by:
ipAddressin interfaceorg.apache.cassandra.spark.common.model.CassandraInstance
-
ipAddressWithPort
public java.lang.String ipAddressWithPort()
- Specified by:
ipAddressWithPortin interfaceorg.apache.cassandra.spark.common.model.CassandraInstance
-
nodeState
public org.apache.cassandra.spark.common.model.NodeState nodeState()
- Specified by:
nodeStatein interfaceorg.apache.cassandra.spark.common.model.CassandraInstance
-
nodeStatus
public org.apache.cassandra.spark.common.model.NodeStatus nodeStatus()
- Specified by:
nodeStatusin interfaceorg.apache.cassandra.spark.common.model.CassandraInstance
-
equals
public boolean equals(@Nullable java.lang.Object other)Custom equality that compares the token, fully qualified domain name, the port, the datacenter and the clusterId Note that node state, status, are not part of the calculation.- Overrides:
equalsin classjava.lang.Object- Parameters:
other- the other instance- Returns:
- true if both instances are equal, false otherwise
-
hashCode
public int hashCode()
Custom hashCode that compares the token, fully qualified domain name, the port, and the datacenter Note that node state and status are not part of the calculation.- Overrides:
hashCodein classjava.lang.Object- Returns:
- The hashcode of this instance based on the important fields
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
ringEntry
public o.a.c.sidecar.client.shaded.common.response.data.RingEntry ringEntry()
-
-