Interface IGetResponse
Common response interface on Get<T>(IKey<T>) request. It can take one of the tree possible values:
- GetSuccess with the result of the request.
- NotFound when a value for requested key didn't exist.
- GetFailure when an exception happened when fulfilling the request.
Namespace: Akka.DistributedData
Assembly: Akka.DistributedData.dll
Syntax
public interface IGetResponse : INoSerializationVerificationNeeded
Properties
| Improve this Doc View SourceIsFailure
True if a failure happened during request fulfillment. False if returned successfully or value not found for the key.
Declaration
bool IsFailure { get; }
Property Value
Type | Description |
---|---|
Boolean |
IsFound
False if value for request was not found. True otherwise.
Declaration
bool IsFound { get; }
Property Value
Type | Description |
---|---|
Boolean |
IsSuccessful
True if value for request was successfully returned. False if value was either not found or ended with failure.
Declaration
bool IsSuccessful { get; }
Property Value
Type | Description |
---|---|
Boolean |
Key
Initial key send by Get<T>(IKey<T>) request.
Declaration
IKey Key { get; }
Property Value
Type | Description |
---|---|
IKey |
Request
Optional object used for request/response correlation.
Declaration
object Request { get; }
Property Value
Type | Description |
---|---|
Object |
Methods
| Improve this Doc View SourceGet<T>(IKey<T>)
Tries to return a result of the request, given a replicated collection
key
used when sending a Akka.DistributedData.Replicator request.
Declaration
T Get<T>(IKey<T> key)
where T : IReplicatedData
Parameters
Type | Name | Description |
---|---|---|
IKey<T> | key | Key send originally with a Akka.DistributedData.Replicator request. |
Returns
Type | Description |
---|---|
T |
Type Parameters
Name | Description |
---|---|
T | Replicated data. |
Exceptions
Type | Condition |
---|---|
KeyNotFoundException | Thrown when no value for provided |
TimeoutException | Thrown when response with given consistency didn't arrive within specified timeout. |