Skip to content

IRepository Interface

sequenze edited this page Jun 10, 2017 · 8 revisions

Represents a strongly typed set of tuples that can be access through pattern matching.

Syntax

    public interface IRepository

Methods

                Name                   Description
Get(IPattern) Retrieves and removes the first tuple from the ISpace, matching the specified pattern. The operation will block if no elements match.
Get(object[]) Retrieves and removes the first tuple from the ISpace, matching the specified pattern. The operation will block if no elements match.
GetP(IPattern) Retrieves and removes the first tuple from the ISpace, matching the specified pattern. The operation is non-blocking. The operation will return null if no elements match.
GetP(object[]) Retrieves and removes the first tuple from the ISpace, matching the specified pattern. The operation is non-blocking. The operation will return null if no elements match.
GetAll(IPattern) Retrieves and removes all tuples from the ISpace matching the specified pattern. The operation is non-blocking. The operation will return an empty set if no elements match.
GetAll(object[]) Retrieves and removes all tuples from the ISpace matching the specified pattern. The operation is non-blocking. The operation will return an empty set if no elements match.
Query(IPattern) Retrieves the first tuple from the ISpace, matching the specified pattern. The operation will block if no elements match.
Query(object[]) Retrieves the first tuple from the ISpace, matching the specified pattern. The operation will block if no elements match.
QueryP(IPattern) Retrieves the first tuple from the ISpace, matching the specified pattern. The operation is non-blocking. The operation will return null if no elements match.
QueryP(object[]) Retrieves the first tuple from the ISpace, matching the specified pattern. The operation is non-blocking. The operation will return null if no elements match.
QueryAll(IPattern) Retrieves all tuples from the ISpace matching the specified pattern. The operation is non-blocking. The operation will return an empty set if no elements match.
QueryAll(object[]) Retrieves all tuples from the ISpace matching the specified pattern. The operation is non-blocking. The operation will return an empty set if no elements match.
Put(ITuple) Inserts the tuple passed as argument into the ISpace.
Put(object[]) Inserts the tuple passed as argument into the ISpace.

Remarks

ISpace is the base interface of all spaces. ISpace implementations are either adhering to FIFO or LIFO ordering of the tuples. Regardless of the implementation, locking mechanisms must be placed to ensure threadsafety.


Examples

The following example demonstrates the implementation of the ISpace interface to create a simple Space.


See Also

Space, IPattern, ITuple, Tuple

Clone this wiki locally