Class ContentReferenceCacheBase
Thread-safe IContentReferenceCache implementation.
Implements
Namespace: Tableau.Migration.Content.Search
Assembly: Tableau.Migration.dll
Syntax
public abstract class ContentReferenceCacheBase : IContentReferenceCache
Properties
Count
Gets the count of items in the cache.
Declaration
public int Count { get; }
Property Value
Type | Description |
---|---|
int |
Methods
ForIdAsync(Guid, CancellationToken)
Finds the content reference item for a given endpoint ID.
Declaration
public Task<IContentReference?> ForIdAsync(Guid id, CancellationToken cancel)
Parameters
Type | Name | Description |
---|---|---|
Guid | id | The ID. |
CancellationToken | cancel | The cancellation token to obey. |
Returns
Type | Description |
---|---|
Task<IContentReference> | The content reference, or null if no item was found. |
ForLocationAsync(ContentLocation, CancellationToken)
Finds the content reference item for a given endpoint location.
Declaration
public Task<IContentReference?> ForLocationAsync(ContentLocation location, CancellationToken cancel)
Parameters
Type | Name | Description |
---|---|---|
ContentLocation | location | The location. |
CancellationToken | cancel | The cancellation token to obey. |
Returns
Type | Description |
---|---|
Task<IContentReference> | The content reference, or null if no item was found. |
IndividualSearchAsync(Guid, CancellationToken)
Searches for content at the given ID.
Declaration
protected virtual Task<ContentReferenceStub?> IndividualSearchAsync(Guid searchId, CancellationToken cancel)
Parameters
Type | Name | Description |
---|---|---|
Guid | searchId | The primary ID to search for. |
CancellationToken | cancel | The cancellation token to obey. |
Returns
Type | Description |
---|---|
Task<ContentReferenceStub> | The content reference to cache, or null. |
IndividualSearchAsync(ContentLocation, CancellationToken)
Searches for content at the given location.
Declaration
protected virtual Task<ContentReferenceStub?> IndividualSearchAsync(ContentLocation searchLocation, CancellationToken cancel)
Parameters
Type | Name | Description |
---|---|---|
ContentLocation | searchLocation | The primary location to search for. |
CancellationToken | cancel | The cancellation token to obey. |
Returns
Type | Description |
---|---|
Task<ContentReferenceStub> | The content reference to cache, or null. |
SearchAsync(Guid, CancellationToken)
Searches for content at the given ID, possibly returning more references to opportunistically cache.
Declaration
protected abstract ValueTask<IEnumerable<ContentReferenceStub>> SearchAsync(Guid searchId, CancellationToken cancel)
Parameters
Type | Name | Description |
---|---|---|
Guid | searchId | The primary ID to search for. |
CancellationToken | cancel | The cancellation token to obey. |
Returns
Type | Description |
---|---|
ValueTask<IEnumerable<ContentReferenceStub>> | The content references to cache. |
SearchAsync(ContentLocation, CancellationToken)
Searches for content at the given location, possibly returning more locations to opportunistically cache.
Declaration
protected abstract ValueTask<IEnumerable<ContentReferenceStub>> SearchAsync(ContentLocation searchLocation, CancellationToken cancel)
Parameters
Type | Name | Description |
---|---|---|
ContentLocation | searchLocation | The primary location to search for. |
CancellationToken | cancel | The cancellation token to obey. |
Returns
Type | Description |
---|---|
ValueTask<IEnumerable<ContentReferenceStub>> | The content references to cache. |