Class ImmutableSessionInfo


  • @ParametersAreNonnullByDefault
    @Generated("org.immutables.processor.ProxyProcessor")
    @Immutable
    @CheckReturnValue
    public final class ImmutableSessionInfo
    extends SessionInfo
    Immutable implementation of SessionInfo.

    Use the builder to create immutable instances: ImmutableSessionInfo.builder().

    • Method Detail

      • getCreateIndex

        public long getCreateIndex()
        Specified by:
        getCreateIndex in class SessionInfo
        Returns:
        The value of the createIndex attribute
      • getLockDelay

        public java.lang.Long getLockDelay()
        Specified by:
        getLockDelay in class SessionInfo
        Returns:
        The value of the lockDelay attribute
      • getName

        public java.util.Optional<java.lang.String> getName()
        Specified by:
        getName in class SessionInfo
        Returns:
        The value of the name attribute
      • getNode

        public java.lang.String getNode()
        Specified by:
        getNode in class SessionInfo
        Returns:
        The value of the node attribute
      • getChecks

        public com.google.common.collect.ImmutableList<java.lang.String> getChecks()
        Specified by:
        getChecks in class SessionInfo
        Returns:
        The value of the checks attribute
      • getBehavior

        public java.lang.String getBehavior()
        Specified by:
        getBehavior in class SessionInfo
        Returns:
        The value of the behavior attribute
      • getTtl

        public java.util.Optional<java.lang.String> getTtl()
        Specified by:
        getTtl in class SessionInfo
        Returns:
        The value of the ttl attribute
      • getId

        public java.lang.String getId()
        Specified by:
        getId in class SessionInfo
        Returns:
        The value of the id attribute
      • withCreateIndex

        public final ImmutableSessionInfo withCreateIndex​(long value)
        Copy the current immutable object by setting a value for the createIndex attribute. A value equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for createIndex
        Returns:
        A modified copy of the this object
      • withLockDelay

        public final ImmutableSessionInfo withLockDelay​(java.lang.Long value)
        Copy the current immutable object by setting a value for the lockDelay attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for lockDelay
        Returns:
        A modified copy of the this object
      • withName

        public final ImmutableSessionInfo withName​(java.lang.String value)
        Copy the current immutable object by setting a present value for the optional name attribute.
        Parameters:
        value - The value for name
        Returns:
        A modified copy of this object
      • withName

        public final ImmutableSessionInfo withName​(java.util.Optional<java.lang.String> optional)
        Copy the current immutable object by setting an optional value for the name attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
        Parameters:
        optional - A value for name
        Returns:
        A modified copy of this object
      • withNode

        public final ImmutableSessionInfo withNode​(java.lang.String value)
        Copy the current immutable object by setting a value for the node attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for node
        Returns:
        A modified copy of the this object
      • withChecks

        public final ImmutableSessionInfo withChecks​(java.lang.String... elements)
        Copy the current immutable object with elements that replace the content of checks.
        Parameters:
        elements - The elements to set
        Returns:
        A modified copy of this object
      • withChecks

        public final ImmutableSessionInfo withChecks​(java.lang.Iterable<java.lang.String> elements)
        Copy the current immutable object with elements that replace the content of checks. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        elements - An iterable of checks elements to set
        Returns:
        A modified copy of this object
      • withBehavior

        public final ImmutableSessionInfo withBehavior​(java.lang.String value)
        Copy the current immutable object by setting a value for the behavior attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for behavior
        Returns:
        A modified copy of the this object
      • withTtl

        public final ImmutableSessionInfo withTtl​(java.lang.String value)
        Copy the current immutable object by setting a present value for the optional ttl attribute.
        Parameters:
        value - The value for ttl
        Returns:
        A modified copy of this object
      • withTtl

        public final ImmutableSessionInfo withTtl​(java.util.Optional<java.lang.String> optional)
        Copy the current immutable object by setting an optional value for the ttl attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
        Parameters:
        optional - A value for ttl
        Returns:
        A modified copy of this object
      • withId

        public final ImmutableSessionInfo withId​(java.lang.String value)
        Copy the current immutable object by setting a value for the id attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for id
        Returns:
        A modified copy of the this object
      • equals

        public boolean equals​(@Nullable
                              java.lang.Object another)
        This instance is equal to all instances of ImmutableSessionInfo that have equal attribute values.
        Overrides:
        equals in class java.lang.Object
        Returns:
        true if this is equal to another instance
      • hashCode

        public int hashCode()
        Computes a hash code from attributes: createIndex, lockDelay, name, node, checks, behavior, ttl, id.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        hashCode value
      • toString

        public java.lang.String toString()
        Prints the immutable value SessionInfo with attribute values.
        Overrides:
        toString in class java.lang.Object
        Returns:
        A string representation of the value
      • copyOf

        public static ImmutableSessionInfo copyOf​(SessionInfo instance)
        Creates an immutable copy of a SessionInfo value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
        Parameters:
        instance - The instance to copy
        Returns:
        A copied immutable SessionInfo instance
      • builder

        public static ImmutableSessionInfo.Builder builder()
        Creates a builder for ImmutableSessionInfo.
         ImmutableSessionInfo.builder()
            .createIndex(long) // required createIndex
            .lockDelay(Long) // required lockDelay
            .name(String) // optional name
            .node(String) // required node
            .addChecks|addAllChecks(String) // checks elements
            .behavior(String) // required behavior
            .ttl(String) // optional ttl
            .id(String) // required id
            .build();
         
        Returns:
        A new ImmutableSessionInfo builder