Enum CacheTopology.Phase

  • All Implemented Interfaces:
    Serializable, Comparable<CacheTopology.Phase>
    Enclosing class:
    CacheTopology

    public static enum CacheTopology.Phase
    extends Enum<CacheTopology.Phase>
    Phase of the rebalance process. Using four phases guarantees these properties: 1. T(x+1).writeCH contains all nodes from Tx.readCH (this is the requirement for ISPN-5021) 2. Tx.readCH and T(x+1).readCH has non-empty subset of nodes (that will allow no blocking for read commands and reading only entries node owns according to readCH) Old entries should be wiped out only after coming to the NO_REBALANCE phase.
    • Enum Constant Detail

      • NO_REBALANCE

        public static final CacheTopology.Phase NO_REBALANCE
        Only currentCH should be set, this works as both readCH and writeCH
      • TRANSITORY

        public static final CacheTopology.Phase TRANSITORY
        Used by caches that don't use 4-phase topology change. PendingCH is used for both read and write.
      • CONFLICT_RESOLUTION

        public static final CacheTopology.Phase CONFLICT_RESOLUTION
        Interim state between NO_REBALANCE → READ_OLD_WRITE_ALL readCh is set locally using previous Topology (of said node) readCH, whilst writeCH contains all members after merge
      • READ_OLD_WRITE_ALL

        public static final CacheTopology.Phase READ_OLD_WRITE_ALL
        Used during state transfer: readCH == currentCH, writeCH = unionCH
      • READ_ALL_WRITE_ALL

        public static final CacheTopology.Phase READ_ALL_WRITE_ALL
        Used after state transfer completes: readCH == writeCH = unionCH
      • READ_NEW_WRITE_ALL

        public static final CacheTopology.Phase READ_NEW_WRITE_ALL
        Intermediate state that prevents ISPN-5021: readCH == pendingCH, writeCH = unionCH
    • Method Detail

      • values

        public static CacheTopology.Phase[] 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 (CacheTopology.Phase c : CacheTopology.Phase.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static CacheTopology.Phase 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
      • isRebalance

        public boolean isRebalance()
      • valueOf

        public static CacheTopology.Phase valueOf​(int ordinal)
        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:
        ordinal - 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