C# Class HaywireMQ.Server.Store.InMemoryMessageStore

Implementation of IMessageStore that stores messages in memory.
Inheritance: IMessageStore
Show file Open project: kellabyte/HaywireMQ Class Usage Examples

Public Methods

Method Description
CreateQueue ( string queueName ) : bool

Creates a message queue with the specified name.

Dispose ( ) : void

Disposes the InMemoryMessageStore.

GetMessage ( string queueName, ulong sequence ) : Message

Gets the message from the specified message queue with the specified sequence number.

GetMessageCount ( string queueName ) : ulong

Gets the count of messages in the specified message queue.

GetNextSequence ( string queueName ) : ulong

Get the next sequence from the specified message queue.

GetQueues ( ) : IList

Gets the available message queues.

InMemoryMessageStore ( ) : System

Iniitalizes a new instance of InMemoryMessageStore class.

QueueExists ( string queueName ) : bool

Checks whether a message queue with the specified name exists.

StoreMessage ( string queueName, Message message ) : void

Stores the specified message in the specified message queue.

Method Details

CreateQueue() public method

Creates a message queue with the specified name.
public CreateQueue ( string queueName ) : bool
queueName string Name of the message queue to create.
return bool

Dispose() public method

Disposes the InMemoryMessageStore.
public Dispose ( ) : void
return void

GetMessage() public method

Gets the message from the specified message queue with the specified sequence number.
public GetMessage ( string queueName, ulong sequence ) : Message
queueName string Name of the message queue.
sequence ulong Sequence of the message.
return Message

GetMessageCount() public method

Gets the count of messages in the specified message queue.
public GetMessageCount ( string queueName ) : ulong
queueName string Name of the message queue to get the message count from.
return ulong

GetNextSequence() public method

Get the next sequence from the specified message queue.
public GetNextSequence ( string queueName ) : ulong
queueName string Name of the message queue to get the next sequence from.
return ulong

GetQueues() public method

Gets the available message queues.
public GetQueues ( ) : IList
return IList

InMemoryMessageStore() public method

Iniitalizes a new instance of InMemoryMessageStore class.
public InMemoryMessageStore ( ) : System
return System

QueueExists() public method

Checks whether a message queue with the specified name exists.
public QueueExists ( string queueName ) : bool
queueName string Name of the message queue to check.
return bool

StoreMessage() public method

Stores the specified message in the specified message queue.
public StoreMessage ( string queueName, Message message ) : void
queueName string Name of the message queue.
message Message Message to store.
return void