Enum Replica.Type

    • Enum Constant Detail

      • NRT

        public static final Replica.Type NRT
        Writes updates to transaction log and indexes locally. Replicas of type NRT support NRT (soft commits) and RTG. Any NRT replica can become a leader. A shard leader will forward updates to all active NRT and TLOG replicas.
      • TLOG

        public static final Replica.Type TLOG
        Writes to transaction log, but not to index, uses replication. Any TLOG replica can become leader (by first applying all local transaction log elements). If a replica is of type TLOG but is also the leader, it will behave as a NRT. A shard leader will forward updates to all active NRT and TLOG replicas.
      • PULL

        public static final Replica.Type PULL
        Doesn’t index or writes to transaction log. Just replicates from NRT or TLOG replicas. PULL replicas can’t become shard leaders (i.e., if there are only pull replicas in the collection at some point, updates will fail same as if there is no leaders, queries continue to work), so they don’t even participate in elections.
    • Method Detail

      • values

        public static Replica.Type[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (Replica.Type c : Replica.Type.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Replica.Type valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null