Enum TagMetadata.TagTtl

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<TagMetadata.TagTtl>
    Enclosing class:
    TagMetadata

    public static enum TagMetadata.TagTtl
    extends java.lang.Enum<TagMetadata.TagTtl>
    TagMetadata.TagTtl is an integer that represents number of hops a tag can propagate.

    Anytime a sender serializes a tag, sends it over the wire and receiver deserializes the tag then the tag is considered to have travelled one hop.

    There could be one or more proxy(ies) between sender and receiver. Proxies are treated as transparent entities and they are not counted as hops.

    For now, only special values of TagMetadata.TagTtl are supported.

    Since:
    0.20
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int hops  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private TagTtl​(int hops)  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static TagMetadata.TagTtl valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static TagMetadata.TagTtl[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • NO_PROPAGATION

        public static final TagMetadata.TagTtl NO_PROPAGATION
        A Tag with NO_PROPAGATION is considered to have local scope and is used within the process where it's created.
        Since:
        0.20
      • UNLIMITED_PROPAGATION

        public static final TagMetadata.TagTtl UNLIMITED_PROPAGATION
        A Tag with UNLIMITED_PROPAGATION can propagate unlimited hops.

        However, it is still subject to outgoing and incoming (on remote side) filter criteria.

        UNLIMITED_PROPAGATION is typical used to track a request, which may be processed across multiple entities.

        Since:
        0.20
    • Field Detail

      • hops

        private final int hops
    • Constructor Detail

      • TagTtl

        private TagTtl​(int hops)
    • Method Detail

      • values

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

        public static TagMetadata.TagTtl valueOf​(java.lang.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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null