Class ReplicaLayout<E extends Endpoints<E>>

    • Method Detail

      • natural

        public final E natural()
        The 'natural' owners of the ring position(s), as implied by the current ring layout. This excludes any pending owners, i.e. those that are in the process of taking ownership of a range, but have not yet finished obtaining their view of the range.
      • all

        public E all()
        All relevant owners of the ring position(s) for this operation, as implied by the current ring layout. For writes, this will include pending owners, and for reads it will be equivalent to natural()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • forTokenWriteLiveAndDown

        public static ReplicaLayout.ForTokenWrite forTokenWriteLiveAndDown​(Keyspace keyspace,
                                                                           Token token)
        Gets the 'natural' and 'pending' replicas that own a given token, with no filtering or processing. Since a write is intended for all nodes (except, unless necessary, transient replicas), this method's only responsibility is to fetch the 'natural' and 'pending' replicas, then resolve any conflicts haveWriteConflicts(Endpoints, Endpoints)
      • forTokenReadLiveSorted

        public static ReplicaLayout.ForTokenRead forTokenReadLiveSorted​(AbstractReplicationStrategy replicationStrategy,
                                                                        Token token)
        Returns:
        the read layout for a token - this includes only live natural replicas, i.e. those that are not pending and not marked down by the failure detector. these are reverse sorted by the badness score of the configured snitch