-
Notifications
You must be signed in to change notification settings - Fork 2
RepositoryBase Class
sequenze edited this page Jun 19, 2017
·
5 revisions
Provides the basic functionality for supporting multiple distributed spaces. This is an abstract class. The RepositoryBase class allows direct access to the contained spaces through their respective identifies. Additionally, RepositoryBase facilitates distributed access to the underlying spaces through Gates.
Object
public abstract class RepositoryBase : IRepository
Name | Description |
---|---|
RepositoryBase() | Initializes a new instance of the RepositoryBase class. |
Name | Description |
---|---|
AddGate(String) | Adds a new Gate to the repository based on the provided connectionstring. |
AddSpace(String,ISpace) | Adds a new Space to the repository, identified by the specified parameter. |
GetSpace(String) | Returns the local instance of the space identified by the parameter. |
Get(String,IPattern) | Retrieves and removes the first tuple from the target Space, matching the specified pattern. The operation will block if no elements match. |
Get(String,Object[]) | Retrieves and removes the first tuple from the target Space, matching the specified pattern. The operation will block if no elements match. |
GetP(String,IPattern) | Retrieves and removes the first tuple from the target Space, matching the specified pattern. The operation is non-blocking. The operation will return null if no elements match. |
GetP(String,Object[]) | Retrieves and removes the first tuple from the target Space, matching the specified pattern. The operation is non-blocking. The operation will return null if no elements match. |
GetAll(String,IPattern) | Retrieves and removes all tuples from the target Space matching the specified pattern. The operation is non-blocking. The operation will return an empty set if no elements match. |
GetAll(String,Object[]) | Retrieves and removes all tuples from the target Space matching the specified pattern. The operation is non-blocking. The operation will return an empty set if no elements match. |
Query(String,IPattern) | Retrieves the first tuple from the target Space, matching the specified pattern. The operation will block if no elements match. |
Query(String,Object[]) | Retrieves the first tuple from the target Space, matching the specified pattern. The operation will block if no elements match. |
QueryP(String,IPattern) | Retrieves the first tuple from the target Space, matching the specified pattern. The operation is non-blocking. The operation will return null if no elements match. |
QueryP(String,Object[]) | Retrieves the first tuple from the target Space, matching the specified pattern.The operation is non-blocking.The operation will return null if no elements match. |
QueryAll(String,IPattern) | Retrieves all tuples from the target Space matching the specified pattern. The operation is non-blocking. The operation will return an empty set if no elements match. |
QueryAll(String,Object[]) | Retrieves all tuples from the target Space matching the specified pattern. The operation is non-blocking. The operation will return an empty set if no elements match. |
Put(String,ITuple) | Inserts the tuple passed as argument into the target Space. |
Put(String,Object[]) | Inserts the tuple passed as argument into the target Space. |
OnConnect(IConnectionMode) | Template method that is called when the repository receives an incoming connection. |
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.