Package io.dapr.client.domain
Class QueryStateItem<T>
- java.lang.Object
-
- io.dapr.client.domain.QueryStateItem<T>
-
public class QueryStateItem<T> extends Object
-
-
Constructor Summary
Constructors Constructor Description QueryStateItem(String key)
Create an immutable state reference to be retrieved or deleted.QueryStateItem(String key, String etag, String error)
Create an immutable state reference to be retrieved or deleted.QueryStateItem(String key, T value, String etag)
Create an immutable state.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
String
getError()
Retrieve the error for this state.String
getEtag()
Retrieve the ETag of this state.String
getKey()
Retrieves the Key of the state.T
getValue()
Retrieves the Value of the state.int
hashCode()
String
toString()
-
-
-
Constructor Detail
-
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 stateetag
- - 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 Detail
-
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.
-
-