io.vertx.ext.consul

## Class SessionList

- java.lang.Object
- - io.vertx.ext.consul.SessionList

-     public class SessionList
      extends Object

  Holds result of sessions query
  Author:
    Ruslan Sennov

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SessionList()` Default constructor
    `SessionList(JsonObject json)` Constructor from JSON
    `SessionList(SessionList other)` Copy constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object o)`
    `long` | `getIndex()` Get Consul index
    `List<Session>` | `getList()` Get list of sessions
    `int` | `hashCode()`
    `SessionList` | `setIndex(long index)` Set Consul index, a unique identifier representing the current state of the requested list of sessions
    `SessionList` | `setList(List<Session> list)` Set list of sessions
    `JsonObject` | `toJson()` Convert to JSON

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### SessionList

          public SessionList()

      Default constructor

    - #### SessionList

          public SessionList(SessionList other)

      Copy constructor
      Parameters:
        `other` - the one to copy

    - #### SessionList

          public SessionList(JsonObject json)

      Constructor from JSON
      Parameters:
        `json` - the JSON

  - ### Method Detail

    - #### toJson

          public JsonObject toJson()

      Convert to JSON
      Returns:
        the JSON

    - #### getIndex

          public long getIndex()

      Get Consul index
      Returns:
        the consul index

    - #### setIndex

          public SessionList setIndex(long index)

      Set Consul index, a unique identifier representing the current state of the requested list of sessions
      Parameters:
        `index` - the consul index
      Returns:
        reference to this, for fluency

    - #### getList

          public List<Session> getList()

      Get list of sessions
      Returns:
        the list of sessions

    - #### setList

          public SessionList setList(List<Session> list)

      Set list of sessions
      Parameters:
        `list` - the list of sessions
      Returns:
        reference to this, for fluency

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

Copyright © 2025 Eclipse. All rights reserved.