C# Класс RedisQueue.Net.Clients.QueueClient

Наследование: IQueueClient
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
CacheCurrentTask ( ) : void
CheckCacheAndRetrieveState ( ) : void
PurgeCache ( ) : void

Приватные методы

Метод Описание
removeTask ( string queue, RedisQueue.Net.Clients.Entities.TaskMessage task ) : void

Описание методов

AllQueues() публичный Метод

Returns a list of all queues found.
public AllQueues ( ) : IList
Результат IList

AllTasks() публичный Метод

Returns all tasks.
public AllTasks ( QueueName queue ) : IList
queue QueueName
Результат IList

AllTasks() публичный Метод

Returns all tasks.
public AllTasks ( string queue ) : IList
queue string
Результат IList

CacheCurrentTask() защищенный Метод

protected CacheCurrentTask ( ) : void
Результат void

CheckCacheAndRetrieveState() защищенный Метод

protected CheckCacheAndRetrieveState ( ) : void
Результат void

CriticalFail() публичный Метод

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
Результат void

Defer() публичный Метод

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
Результат void

Dispose() публичный Метод

Disposable impl. Handles cleanup and marks any uncompleted tasks as failed.
public Dispose ( ) : void
Результат void

Enqueue() публичный Метод

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
Результат void

Fail() публичный Метод

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
Результат void

FailedTasks() публичный Метод

Returns all failed tasks.
public FailedTasks ( QueueName queue ) : IList
queue QueueName
Результат IList

FailedTasks() публичный Метод

Returns all failed tasks.
public FailedTasks ( string queue ) : IList
queue string
Результат IList

GetSubscription() публичный Метод

Returns an empty channel subscription.
public GetSubscription ( ) : IRedisSubscription
Результат IRedisSubscription

PendingTasks() публичный Метод

Returns all pending tasks.
public PendingTasks ( QueueName queue ) : IList
queue QueueName
Результат IList

PendingTasks() публичный Метод

Returns all pending tasks.
public PendingTasks ( string queue ) : IList
queue string
Результат IList

PurgeCache() защищенный Метод

protected PurgeCache ( ) : void
Результат void

QueueClient() публичный Метод

Uses app settings for RedisHost and RedisPort and local caching
public QueueClient ( ) : System
Результат System

QueueClient() публичный Метод

Uses app settings for RedisHost and RedisPort
public QueueClient ( bool enableLocalCaching ) : System
enableLocalCaching bool Enable/Disable local caching
Результат System

QueueClient() публичный Метод

public QueueClient ( string host, int port, bool enableCaching ) : System
host string
port int
enableCaching bool
Результат System

RemoveTask() публичный Метод

Removes a task with a specific task identifier.
public RemoveTask ( RedisQueue.Net.Clients.Entities.TaskMessage task ) : void
task RedisQueue.Net.Clients.Entities.TaskMessage
Результат void

Reserve() публичный Метод

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
Результат RedisQueue.Net.Clients.Entities.TaskMessage

Reserve() публичный Метод

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
Результат RedisQueue.Net.Clients.Entities.TaskMessage

SendMessage() публичный Метод

Sends a message to the channel associated with a specific queue.
public SendMessage ( string message, QueueName queue ) : void
message string
queue QueueName
Результат void

SendMessage() публичный Метод

Sends a message to the channel associated with a specific queue.
public SendMessage ( string message, string queue ) : void
message string
queue string
Результат void

Succeed() публичный Метод

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
Результат void

SucceededTasks() публичный Метод

Returns all succeeded tasks.
public SucceededTasks ( QueueName queue ) : IList
queue QueueName
Результат IList

SucceededTasks() публичный Метод

Returns all succeeded tasks.
public SucceededTasks ( string queue ) : IList
queue string
Результат IList