Class QueryStateItem<T>

java.lang.Object
io.dapr.client.domain.QueryStateItem<T>

public class QueryStateItem<T> extends Object
  • Constructor Details

    • QueryStateItem

      public QueryStateItem(String key)
      Create an immutable state reference to be retrieved or deleted. This Constructor CAN be used anytime you need to retrieve or delete a state.
      Parameters:
      key - - The key of the state
    • QueryStateItem

      public QueryStateItem(String key, String etag, String error)
      Create an immutable state reference to be retrieved or deleted. This Constructor CAN be used anytime you need to retrieve or delete a state.
      Parameters:
      key - - The key of the state
      etag - - The etag of the state - Keep in mind that for some state stores (like redis) only numbers are supported.
      error - - Error when fetching the state.
    • QueryStateItem

      public QueryStateItem(String key, T value, String etag)
      Create an immutable state. This Constructor CAN be used anytime you want the state to be saved.
      Parameters:
      key - - The key of the state.
      value - - The value of the state.
      etag - - The etag of the state - for some state stores (like redis) only numbers are supported.
  • Method Details

    • getValue

      public T getValue()
      Retrieves the Value of the state.
      Returns:
      The value of the state
    • getKey

      public String getKey()
      Retrieves the Key of the state.
      Returns:
      The key of the state
    • getEtag

      public String getEtag()
      Retrieve the ETag of this state.
      Returns:
      The etag of the state
    • getError

      public String getError()
      Retrieve the error for this state.
      Returns:
      The error for this state.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object