C# Class RedisQueue.Net.Clients.QueueClient

Inheritance: IQueueClient
Afficher le fichier Open project: e-travel/RedisQueue.Net Class Usage Examples

Méthodes publiques

Méthode Description
AllQueues ( ) : IList

Returns a list of all queues found.

AllTasks ( QueueName queue ) : IList

Returns all tasks.

AllTasks ( string queue ) : IList

Returns all tasks.

CriticalFail ( string reason ) : void

Marks the current task as failed, and regardless of the cycling setting, places it in the :failed queue.

Defer ( string reason ) : void

Marks the currently reserved task as Deferred.

Dispose ( ) : void

Disposable impl. Handles cleanup and marks any uncompleted tasks as failed.

Enqueue ( RedisQueue.Net.Clients.Entities.TaskMessage t ) : void

Adds a task to the queue specified in the task itself and sends a message to the associated channel, notifying any listeners.

Fail ( string reason ) : void

Marks the currently reserved task as failed.

FailedTasks ( QueueName queue ) : IList

Returns all failed tasks.

FailedTasks ( string queue ) : IList

Returns all failed tasks.

GetSubscription ( ) : IRedisSubscription

Returns an empty channel subscription.

PendingTasks ( QueueName queue ) : IList

Returns all pending tasks.

PendingTasks ( string queue ) : IList

Returns all pending tasks.

QueueClient ( ) : System

Uses app settings for RedisHost and RedisPort and local caching

QueueClient ( bool enableLocalCaching ) : System

Uses app settings for RedisHost and RedisPort

QueueClient ( string host, int port, bool enableCaching ) : System
RemoveTask ( RedisQueue.Net.Clients.Entities.TaskMessage task ) : void

Removes a task with a specific task identifier.

Reserve ( QueueName queue ) : RedisQueue.Net.Clients.Entities.TaskMessage

Obtains the first available task from the specified queue, and changes the client's state into TaskReserved. In that state, no new tasks can be reserved until the task's outcome is evident.

Reserve ( string queue ) : RedisQueue.Net.Clients.Entities.TaskMessage

Obtains the first available task from the specified queue, and changes the client's state into TaskReserved. In that state, no new tasks can be reserved until the task's outcome is evident.

SendMessage ( string message, QueueName queue ) : void

Sends a message to the channel associated with a specific queue.

SendMessage ( string message, string queue ) : void

Sends a message to the channel associated with a specific queue.

Succeed ( ) : void

Marks the currently reserved task as succeeded.

SucceededTasks ( QueueName queue ) : IList

Returns all succeeded tasks.

SucceededTasks ( string queue ) : IList

Returns all succeeded tasks.

Méthodes protégées

Méthode Description
CacheCurrentTask ( ) : void
CheckCacheAndRetrieveState ( ) : void
PurgeCache ( ) : void

Private Methods

Méthode Description
removeTask ( string queue, RedisQueue.Net.Clients.Entities.TaskMessage task ) : void

Method Details

AllQueues() public méthode

Returns a list of all queues found.
public AllQueues ( ) : IList
Résultat IList

AllTasks() public méthode

Returns all tasks.
public AllTasks ( QueueName queue ) : IList
queue QueueName
Résultat IList

AllTasks() public méthode

Returns all tasks.
public AllTasks ( string queue ) : IList
queue string
Résultat IList

CacheCurrentTask() protected méthode

protected CacheCurrentTask ( ) : void
Résultat void

CheckCacheAndRetrieveState() protected méthode

protected CheckCacheAndRetrieveState ( ) : void
Résultat void

CriticalFail() public méthode

Marks the current task as failed, and regardless of the cycling setting, places it in the :failed queue.
public CriticalFail ( string reason ) : void
reason string
Résultat void

Defer() public méthode

Marks the currently reserved task as Deferred.
No task has been reserved. Future failure not yet /// supported. CurrentTask is null. Something's seriously off.
public Defer ( string reason ) : void
reason string
Résultat void

Dispose() public méthode

Disposable impl. Handles cleanup and marks any uncompleted tasks as failed.
public Dispose ( ) : void
Résultat void

Enqueue() public méthode

Adds a task to the queue specified in the task itself and sends a message to the associated channel, notifying any listeners.
public Enqueue ( RedisQueue.Net.Clients.Entities.TaskMessage t ) : void
t RedisQueue.Net.Clients.Entities.TaskMessage
Résultat void

Fail() public méthode

Marks the currently reserved task as failed.
No task has been reserved. Future failure not yet /// supported. CurrentTask is null. Something's seriously off.
public Fail ( string reason ) : void
reason string
Résultat void

FailedTasks() public méthode

Returns all failed tasks.
public FailedTasks ( QueueName queue ) : IList
queue QueueName
Résultat IList

FailedTasks() public méthode

Returns all failed tasks.
public FailedTasks ( string queue ) : IList
queue string
Résultat IList

GetSubscription() public méthode

Returns an empty channel subscription.
public GetSubscription ( ) : IRedisSubscription
Résultat IRedisSubscription

PendingTasks() public méthode

Returns all pending tasks.
public PendingTasks ( QueueName queue ) : IList
queue QueueName
Résultat IList

PendingTasks() public méthode

Returns all pending tasks.
public PendingTasks ( string queue ) : IList
queue string
Résultat IList

PurgeCache() protected méthode

protected PurgeCache ( ) : void
Résultat void

QueueClient() public méthode

Uses app settings for RedisHost and RedisPort and local caching
public QueueClient ( ) : System
Résultat System

QueueClient() public méthode

Uses app settings for RedisHost and RedisPort
public QueueClient ( bool enableLocalCaching ) : System
enableLocalCaching bool Enable/Disable local caching
Résultat System

QueueClient() public méthode

public QueueClient ( string host, int port, bool enableCaching ) : System
host string
port int
enableCaching bool
Résultat System

RemoveTask() public méthode

Removes a task with a specific task identifier.
public RemoveTask ( RedisQueue.Net.Clients.Entities.TaskMessage task ) : void
task RedisQueue.Net.Clients.Entities.TaskMessage
Résultat void

Reserve() public méthode

Obtains the first available task from the specified queue, and changes the client's state into TaskReserved. In that state, no new tasks can be reserved until the task's outcome is evident.
public Reserve ( QueueName queue ) : RedisQueue.Net.Clients.Entities.TaskMessage
queue QueueName
Résultat RedisQueue.Net.Clients.Entities.TaskMessage

Reserve() public méthode

Obtains the first available task from the specified queue, and changes the client's state into TaskReserved. In that state, no new tasks can be reserved until the task's outcome is evident.
public Reserve ( string queue ) : RedisQueue.Net.Clients.Entities.TaskMessage
queue string
Résultat RedisQueue.Net.Clients.Entities.TaskMessage

SendMessage() public méthode

Sends a message to the channel associated with a specific queue.
public SendMessage ( string message, QueueName queue ) : void
message string
queue QueueName
Résultat void

SendMessage() public méthode

Sends a message to the channel associated with a specific queue.
public SendMessage ( string message, string queue ) : void
message string
queue string
Résultat void

Succeed() public méthode

Marks the currently reserved task as succeeded.
CurrentTask is null. Something's seriously off. No task has been reserved. Future success not yet /// supported.
public Succeed ( ) : void
Résultat void

SucceededTasks() public méthode

Returns all succeeded tasks.
public SucceededTasks ( QueueName queue ) : IList
queue QueueName
Résultat IList

SucceededTasks() public méthode

Returns all succeeded tasks.
public SucceededTasks ( string queue ) : IList
queue string
Résultat IList