Skip to content

ITuple Interface

sequenze edited this page Jun 9, 2017 · 11 revisions

Represents a strongly typed set of tuples that can be access through pattern matching. Provides methods to query and manipulate the set.

Syntax

    public interface ISpace

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

The Space class is a threadsafe data structure. It implements the ISpace interface.

You can add tuples to a Space by using the Put methods. Conversely, tuples can be fetched through Query,QueryP, QueryAll, Get, GetP and GetAll.


Please note that all variants of the Get operations not only fetches the tuple(s), but also removes them from the space.


Examples


See Also

ISpace, IPattern, ITuple, Tuple

Clone this wiki locally