Space is a virtual storage area for entries.

Namespace: Com.Tibco.As.Space
Assembly: TIBCO.ActiveSpaces.Common (in TIBCO.ActiveSpaces.Common.dll) Version: 2.0.0.0 (2.2.0.015)

Syntax

C#
public interface Space
Visual Basic
Public Interface Space
Visual C++
public interface class Space
F#
type Space =  interface end

Remarks

A space has the following attributes:
  • Name: Space Space name should be unique within a Metaspace and should conform to the following rules:
    • Cannot start with a '$','.' or '_'
    • Cannot contain a '>' and '*'
  • Space Definition: A space has a definition SpaceDef specified by an ActiveSpaces application or through the ActiveSpace Administration tool
  • Joining a space: an ActiveSpaces application joins a Space with a role. When an ActiveSpaces application joins a Space, it becomes a Member of the space. Space has state and needs to be in SpaceState.READY state in order to allow operations on the space. An application can join the space in either of the following roles:
    • ROLE_SEEDER: The Member is willing to store (seed) entries put into the Space by any Member.
    • ROLE_LEECH: The Member is not willing to store any entries put into the Space by any Member.
  • Space distribution:
    • Distributed: Storage of entries is distributed amongst all seeding Members. Agents automatically join the Space as seeding Members.
    • Non-distributed: One of the seeding Members stores all the entries. Agents do not automatically join the space.
A Space offers the following functionality:
  • Tuple storage and retrieval:
    • Put: stores a Tuple into the Space
    • Get: returns the Tuple (if one exists) whose key fields match the key fields of the Tuple provided.
    • Take: returns the Tuple and atomically removes from the Space (if one exists) whose key fields match the key fields of the Tuple provided.
    • CompareAndPut: compare and put operation.
    • CompareAndTake: compare and take operation.
  • Locking: Entries in a Space can be made read-only by locking them. If a Member attempts an operation that will modify a locked key, this operation will block until the lock is cleared or for a maximum amount of time specified in the LockWait SpaceDef attribute.
  • Listeners: ActiveSpaces applications can have callbacks invoked when certain events occur. Following events can cause callbacks to be invoked:
    • Put events: When a Put happens and a new tuple is stored in the Space
    • Take events: When a Take happens and a new tuple is stored in the Space
    • Expire events: When a Expire happens and a new tuple is stored in the Space
  • Browsers: Allow retrieval and operations over multiple entries in the Space. Browsers can be continuously updated according to changes in the Space (i.e. they are always coherent with the space unless the browser's timescope is SNAPSHOT). Operations such as Get, Take and Lock can be invoked on the entries being browsed according to the type of the Browser (TAKE and LOCK browsers are always consistent with the space being browsed).

See Also