Skip to content

Commit

Permalink
rename includeStateless to includeTransient
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianburckhardt committed Oct 6, 2023
1 parent 9c8f7c8 commit 29586e3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
12 changes: 7 additions & 5 deletions src/Client/Core/Entities/EntityQuery.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,15 @@ public string? InstanceIdStartsWith
public bool IncludeState { get; init; } = true;

/// <summary>
/// Gets a value indicating whether to include metadata about entities that have no user-defined state. Defaults to false.
/// Gets a value indicating whether to include metadata about transient entities. Defaults to false.
/// </summary>
/// <remarks> Stateless entities occur when the storage provider is tracking metadata about an entity for synchronization purposes
/// even though the entity does not "logically" exist, in the sense that it has no application-defined state.
/// Stateless entities are usually transient. For example, they may be in the process of being created or deleted, or they may have been locked by a critical section.
/// <remarks> Transient entities are entities that do not have an application-defined state, but for which the storage provider is
/// tracking metadata for synchronization purposes.
/// For example, a transient entity may be observed when the entity is in the process of being created or deleted, or
/// when the entity has been locked by a critical section. By default, transient entities are not included in queries since they are
/// considered to "not exist" from the perspective of the user application.
/// </remarks>
public bool IncludeStateless { get; init; }
public bool IncludeTransient { get; init; }

/// <summary>
/// Gets the size of each page to return. If null, the page size is determined by the backend.
Expand Down
4 changes: 2 additions & 2 deletions src/Client/Grpc/GrpcDurableEntityClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ AsyncPageable<TMetadata> GetAllEntitiesCoreAsync<TMetadata>(
where TMetadata : class
{
bool includeState = filter?.IncludeState ?? true;
bool includeStateless = filter?.IncludeStateless ?? false;
bool includeTransient = filter?.IncludeTransient ?? false;
string startsWith = filter?.InstanceIdStartsWith ?? string.Empty;
DateTimeOffset? lastModifiedFrom = filter?.LastModifiedFrom;
DateTimeOffset? lastModifiedTo = filter?.LastModifiedTo;
Expand All @@ -186,7 +186,7 @@ AsyncPageable<TMetadata> GetAllEntitiesCoreAsync<TMetadata>(
LastModifiedFrom = lastModifiedFrom?.ToTimestamp(),
LastModifiedTo = lastModifiedTo?.ToTimestamp(),
IncludeState = includeState,
IncludeStateless = includeStateless,
IncludeTransient = includeTransient,
PageSize = pageSize,
ContinuationToken = continuation ?? filter?.ContinuationToken,
},
Expand Down

0 comments on commit 29586e3

Please sign in to comment.