tibasSpaceDef_SetCapacity()

Sets the capacity (in number of tuples per seeder) of the SpaceDef.

Declaration

tibas_status tibasSpaceDef_SetCapacity(
    tibasSpaceDef spaceDef,
    tibas_long    capacity)

Parameters

Parameter Description
spaceDef The TIBCO ActiveSpaces entity on which the function is invoked.
capacity The capacity (in tuples per seeder) to be set for the specified space.

Remarks

Use the tibasSpaceDef_SetCapacity() function to set the capacity value for a specified spaceDef. The capacity value controls how much memory is used by seeders for storing and replicating tuples in the space. The capacity is expressed in number of tuples per seeder and defaults to -1, which means an infinite number of tuples per seeder.

If a capacity is specified, an eviction policy is used to indicate the outcome of an operation that would result in an additional tuple being seeded by a seeder that is already at capacity. The two choices for the eviction policy are exception, which means that the operation will fail with the appropriate exception being stored in the Result object, or eviction, which means that the seeder will evict another tuple using the eviction algorithm Least Recently Used (LRU), meaning least recently read or modified tuple) eviction algorithm.