tibasSpaceDef_SetEvictionPolicy()

Specifies the eviction policy for a specified space.

Declaration

tibas_status tibasSpaceDef_SetEvictionPolicy(
    tibasSpaceDef spaceDef,
    tibas_evictionPolicy evictionPolicy)

Parameters

Parameter Description
spaceDef The TIBCO ActiveSpaces entity on which the function is invoked.
evictionPolicy The eviction policy to be set for the specified space.

Remarks

Use the tibasSpaceDef_SetEvictionPolicy() function to specify the eviction policy for a specified space.

The eviction policy can be:

TIBAS_EVICTION_NONE
Do not evict any tuples from the space.
TIBAS_EVICTION_LRU
Use the least recently used (LRU) algorithm to evict tuples from the space when the capacity of the space is reached.

If you specify TIBAS_EVICTION_LRU, then you must also specify a capacity value for the space by calling the tibasSpaceDef_SetCapacity() function.

If you specify a capacity and a LRU policy, then if the space is full (the specified capacity has been reached) and a request to insert a new tuple is made, the space will evict one of the tuples to make room for the new one.