C# Class NuGet.Services.Work.InvocationQueue

显示文件 Open project: NuGet/NuGet.Services.Work Class Usage Examples

Public Properties

Property Type Description
ArchiveContainer string
Null InvocationQueue

Public Methods

Method Description
Complete ( InvocationState invocation, ExecutionResult result, string resultMessage, string logUrl ) : Task

Acknowledges that the request has completed successfully, removing the message from the queue.

Dequeue ( System.TimeSpan invisibleFor, CancellationToken token ) : Task

Dequeues the next request, if one is present

Enqueue ( string job, string source ) : Task
Enqueue ( string job, string source, string>.Dictionary payload ) : Task
Enqueue ( string job, string source, string>.Dictionary payload, System.TimeSpan invisibleFor, string jobInstanceName = null ) : Task
Enqueue ( string job, string source, string>.Dictionary payload, System.TimeSpan invisibleFor, string jobInstanceName, bool unlessAlreadyRunning ) : Task
Enqueue ( string job, string source, string>.Dictionary payload, bool unlessAlreadyRunning ) : Task
Enqueue ( string job, string source, bool unlessAlreadyRunning ) : Task
Extend ( InvocationState invocation, System.TimeSpan duration ) : Task

Extends the visibility timeout of the request. That is, the time during which the queue message is hidden from other clients

Get ( System.Guid id ) : Task
GetAll ( InvocationListCriteria criteria ) : Task>
GetAll ( InvocationListCriteria criteria, int limit ) : Task>
GetByInstance ( string instanceName, System.DateTime start, System.DateTime end, int limit ) : Task>
GetByJob ( string jobName, System.DateTime start, System.DateTime end, int limit ) : Task>
GetInstanceStatistics ( ) : Task>
GetJobStatistics ( ) : Task>
GetLatestByJob ( ) : Task>
GetLatestForJob ( string jobName ) : Task
GetMostRecentState ( string jobName ) : Task
GetPurgable ( ) : Task>
GetPurgable ( DateTimeOffset before ) : Task>
GetStatistics ( ) : Task
InvocationQueue ( System.Clock clock, string instanceName, Microsoft.WindowsAzure.Storage.Blob.CloudBlobContainer archiveContainer, System.Data.SqlClient.SqlConnectionStringBuilder connectionString ) : System
InvocationQueue ( System.Clock clock, string instanceName, ConfigurationHub config ) : System
Purge ( System.Guid id ) : Task
Purge ( IEnumerable ids ) : Task
PurgeCompleted ( ) : Task>
PurgeCompleted ( DateTimeOffset before ) : Task>
ReinitializeInvocationState ( ) : Task
Suspend ( InvocationState invocation, string>.Dictionary newPayload, System.TimeSpan suspendFor, string logUrl ) : Task
UpdateStatus ( InvocationState invocation, InvocationStatus status, ExecutionResult result ) : Task

Protected Methods

Method Description
InvocationQueue ( ) : System

Private Methods

Method Description
ArchiveInvocation ( IOrderedEnumerable invocationHistory ) : Task
Connect ( ) : Task
ConnectAndExec ( string proc, object parameters ) : Task
ConnectAndQuery ( string sql, object parameters = null ) : Task>
ConnectAndQuerySingle ( string sql, object parameters = null ) : Task
GetStatisticsCore ( string view ) : Task>
ProcessResult ( InvocationState invocation, InvocationState result ) : bool

Method Details

Complete() public method

Acknowledges that the request has completed successfully, removing the message from the queue.
public Complete ( InvocationState invocation, ExecutionResult result, string resultMessage, string logUrl ) : Task
invocation InvocationState
result ExecutionResult
resultMessage string
logUrl string
return Task

Dequeue() public method

Dequeues the next request, if one is present
public Dequeue ( System.TimeSpan invisibleFor, CancellationToken token ) : Task
invisibleFor System.TimeSpan The period of time during which the message is invisble to other clients. The job must be d before this time or it will be dispatched again
token System.Threading.CancellationToken
return Task

Enqueue() public method

public Enqueue ( string job, string source ) : Task
job string
source string
return Task

Enqueue() public method

public Enqueue ( string job, string source, string>.Dictionary payload ) : Task
job string
source string
payload string>.Dictionary
return Task

Enqueue() public method

public Enqueue ( string job, string source, string>.Dictionary payload, System.TimeSpan invisibleFor, string jobInstanceName = null ) : Task
job string
source string
payload string>.Dictionary
invisibleFor System.TimeSpan
jobInstanceName string
return Task

Enqueue() public method

public Enqueue ( string job, string source, string>.Dictionary payload, System.TimeSpan invisibleFor, string jobInstanceName, bool unlessAlreadyRunning ) : Task
job string
source string
payload string>.Dictionary
invisibleFor System.TimeSpan
jobInstanceName string
unlessAlreadyRunning bool
return Task

Enqueue() public method

public Enqueue ( string job, string source, string>.Dictionary payload, bool unlessAlreadyRunning ) : Task
job string
source string
payload string>.Dictionary
unlessAlreadyRunning bool
return Task

Enqueue() public method

public Enqueue ( string job, string source, bool unlessAlreadyRunning ) : Task
job string
source string
unlessAlreadyRunning bool
return Task

Extend() public method

Extends the visibility timeout of the request. That is, the time during which the queue message is hidden from other clients
public Extend ( InvocationState invocation, System.TimeSpan duration ) : Task
invocation InvocationState
duration System.TimeSpan The duration from the time of invocation to hide the message
return Task

Get() public method

public Get ( System.Guid id ) : Task
id System.Guid
return Task

GetAll() public method

public GetAll ( InvocationListCriteria criteria ) : Task>
criteria InvocationListCriteria
return Task>

GetAll() public method

public GetAll ( InvocationListCriteria criteria, int limit ) : Task>
criteria InvocationListCriteria
limit int
return Task>

GetByInstance() public method

public GetByInstance ( string instanceName, System.DateTime start, System.DateTime end, int limit ) : Task>
instanceName string
start System.DateTime
end System.DateTime
limit int
return Task>

GetByJob() public method

public GetByJob ( string jobName, System.DateTime start, System.DateTime end, int limit ) : Task>
jobName string
start System.DateTime
end System.DateTime
limit int
return Task>

GetInstanceStatistics() public method

public GetInstanceStatistics ( ) : Task>
return Task>

GetJobStatistics() public method

public GetJobStatistics ( ) : Task>
return Task>

GetLatestByJob() public method

public GetLatestByJob ( ) : Task>
return Task>

GetLatestForJob() public method

public GetLatestForJob ( string jobName ) : Task
jobName string
return Task

GetMostRecentState() public method

public GetMostRecentState ( string jobName ) : Task
jobName string
return Task

GetPurgable() public method

public GetPurgable ( ) : Task>
return Task>

GetPurgable() public method

public GetPurgable ( DateTimeOffset before ) : Task>
before DateTimeOffset
return Task>

GetStatistics() public method

public GetStatistics ( ) : Task
return Task

InvocationQueue() protected method

protected InvocationQueue ( ) : System
return System

InvocationQueue() public method

public InvocationQueue ( System.Clock clock, string instanceName, Microsoft.WindowsAzure.Storage.Blob.CloudBlobContainer archiveContainer, System.Data.SqlClient.SqlConnectionStringBuilder connectionString ) : System
clock System.Clock
instanceName string
archiveContainer Microsoft.WindowsAzure.Storage.Blob.CloudBlobContainer
connectionString System.Data.SqlClient.SqlConnectionStringBuilder
return System

InvocationQueue() public method

public InvocationQueue ( System.Clock clock, string instanceName, ConfigurationHub config ) : System
clock System.Clock
instanceName string
config ConfigurationHub
return System

Purge() public method

public Purge ( System.Guid id ) : Task
id System.Guid
return Task

Purge() public method

public Purge ( IEnumerable ids ) : Task
ids IEnumerable
return Task

PurgeCompleted() public method

public PurgeCompleted ( ) : Task>
return Task>

PurgeCompleted() public method

public PurgeCompleted ( DateTimeOffset before ) : Task>
before DateTimeOffset
return Task>

ReinitializeInvocationState() public method

public ReinitializeInvocationState ( ) : Task
return Task

Suspend() public method

public Suspend ( InvocationState invocation, string>.Dictionary newPayload, System.TimeSpan suspendFor, string logUrl ) : Task
invocation InvocationState
newPayload string>.Dictionary
suspendFor System.TimeSpan
logUrl string
return Task

UpdateStatus() public method

public UpdateStatus ( InvocationState invocation, InvocationStatus status, ExecutionResult result ) : Task
invocation InvocationState
status InvocationStatus
result ExecutionResult
return Task

Property Details

ArchiveContainer public_oe static_oe property

public static string ArchiveContainer
return string

Null public_oe static_oe property

public static InvocationQueue,NuGet.Services.Work Null
return InvocationQueue